powered by Jive Software

Stream Management causes chatstates to be stored offline

  1. Alice sends chat state to Bob.
<message to="bob/resource" type="chat" from="alice/resource"><composing xmlns="http://jabber.org/protocol/chatstates"></composing></message>
  1. Bob looks online but he has a broken stream. When the stream gets closed, it adds delay tag to the chat state message.

Referred Code

<message to="bob/resource" type="chat" from="alice/resource"><composing xmlns="http://jabber.org/protocol/chatstates"></composing><delay xmlns="urn:xmpp:delay" stamp="2020-05-15T15:36:31.953Z" from="domain"/></message>
  1. Since chat state stanza has another element, it fails and stores the chat state message as offline.

Referred Code

we recently released 4.5.2. it has a small Stream Management fix in it. could you give it a try to see if you still see the issue?

@speedy it still exists in 4.5.2.

If you have checked the referred code, you will see that it only checks whether it is an instance of Message or not. Since, the chatstate message is also an instance of Message, it adds delay tag to the chat state message.

@guus Could you please have a look at the code i referred?