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=""></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=""></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?

Thanks for reporting this. I’ve raised the following ticket to track this issue: