tigase / beagle-im

(M) XMPP client for macOS based on TigaseSwift XMPP library
GNU General Public License v3.0
181 stars 21 forks source link

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

Closed truenicoco closed 1 year ago

truenicoco commented 1 year ago

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.

hantu85 commented 1 year ago

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.

hantu85 commented 1 year ago

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

truenicoco commented 1 year ago

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