tigase/beagle-im

MUC chat markers are directed at the user's own nick instead of the MUC (bare) JID

truenicoco opened this issue · 3 comments

Describe the bug
If I read a message in MUC, the message containing the chat marker has a to="room@service/MyNick" instead of to="room@service"

To Reproduce
Steps to reproduce the behavior:

  1. Open the XML console
  2. Open a MUC with unread messages
  3. See the outgoing displayed marker

Additional context
I am unsure if this is correct behaviour or not by the spec, but this seems a bit... weird?
I am developing a gateway component with MUC capabilities and I'm OK to handle this gracefully, but I opened this issue to determine whether this beagle behaviour is accidental or intentional.

This is intentional.

In the case of MUC rooms that are not members only, Beagle sends PMs (type="chat") with "read" notification to notify other resources joined with the same nickname that this message was read/received (same user different clients).

In case of MUC rooms that are members only, Beagle sends "read" notifications to the bare JID of the room with type="groupchat" to broadcast this notification to everyone.

Moreover, those PMs are marked with store hint, so they should be stored in user MAM archive.

Thanks for the explanation, I will try to make my thing not return error stanzas when this happens then.