Quantcast
Channel: Ignite Realtime : All Content - Openfire Support
Viewing all articles
Browse latest Browse all 4778

bug of offline message store?

$
0
0

In the offline message table if found some records like this

 

<message id="HYET6-61" to="03872@bs201" from="03870@bs201/spark3.6.11/adasd" type="chat"><thread>cCzB63</thread><inactive xmlns="http://jabber.org/protocol/chatstates"/></message>

 

so I'am check the OfflineMessageStore.java and found this in method shouldStoreMessage()

at the line of 486

 

while (it.hasNext()) {  Object item = it.next();  if (item instanceof Element) {  Element el = (Element) item;  if (!el.getNamespaceURI().equals(  "http://jabber.org/protocol/chatstates")  && !(el.getQName().equals(QName.get("rtt",  "urn:xmpp:rtt:0")))) {  return true;  }  }  }  return false;

 

but the comment write

 // 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
// real time text notification

so order the XEP-0160 the bolck may like this

while (it.hasNext()) {  Object item = it.next();  if (item instanceof Element) {  Element el = (Element) item;  if (el.getNamespaceURI().equals(  "http://jabber.org/protocol/chatstates")  || (el.getQName().equals(QName.get("rtt",  "urn:xmpp:rtt:0")))) {     return false;  }  }  }  return true;

Viewing all articles
Browse latest Browse all 4778

Latest Images

Trending Articles



Latest Images