Hello,
I have implemented chat markers but if other user is offline and other user send any chat marker then it will lost. Means not able to receive when connected again.
Basically all messages which not contain body element are lost if other user is offline.
I am facing this issue in iOS.
Thanks in advance.
CSH
April 11, 2019, 9:16am
2
The relevant code for storing a message offline is here:
// Remove this module as a user event listener
UserEventDispatcher.removeListener(this);
}
/**
* Decide whether a message should be stored offline according to XEP-0160 and XEP-0334.
*
* @param message
* @return <code>true</code> if the message should be stored offline, <code>false</code> otherwise.
*/
static boolean shouldStoreMessage(final Message message) {
// XEP-0334: Implement the <no-store/> hint to override offline storage
if (message.getChildElement("no-store", "urn:xmpp:hints") != null) {
return false;
}
switch (message.getType()) {
case chat:
// XEP-0160: Messages with a 'type' attribute whose value is "chat" SHOULD be stored offline, with the exception of messages that contain only Chat State Notifications (XEP-0085) [7] content
// Iterate through the child elements to see if we can find anything that's not a chat state notification or
Do you see any issue with the code?
Chat messages are stored if there’s at least one extension which is not RTT or Chat States.
Thanks CHS,
But as i have described above that i am facing this issue in iOS only.