i am developing chat application using xmppframework and i am successfully completed the send and receive message , but
1) if i am chat with user A and user B send me message the how can i identify the user B send me the message. (i already maintain the messages in core data so message will be saved) 2) how can i identify the received message is read or unread
NOTE : for message saving i used
xmppMessageArchivingStorage = [XMPPMessageArchivingCoreDataStorage sharedInstance];
xmppMessageArchivingModule = [[XMPPMessageArchiving alloc] initWithMessageArchivingStorage:xmppMessageArchivingStorage];
thanks
You can have look to XEP-0184
This should be the message stanza format
<message
from='sender@domain/resource'
id='messageId-1010'
to='receiver@domain/resource'>
<body>your message </body>
<request xmlns='urn:xmpp:receipts'/>
</message>
And This is received response message
<message
from='receiver@domain/resource'
id='packetId'
to='sender@domain/resource'>
<received xmlns='urn:xmpp:receipts' id='messageId-1010'/>
</message>
Here messageId-1010
will be unique to get you know which message response it is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With