Opened 4 years ago

Last modified 11 months ago

#5348 new defect

Lobby affiliation changes trigger empty system message popup boxes

Reported by: elexis Owned by:
Priority: Must Have Milestone: Alpha 27
Component: Multiplayer lobby Keywords:
Cc: Patch: Phab:D2288


When one changes the affiliation of a user in the room (psi-plus -> configure room -> banlist -> add or remove an entry -> apply), then (as of r21931):

  • every player in the lobby gets a a popup with an empty message and a "Private" empty chat message
  • affiliation changes are frequent, players are annoyed and annoy moderators with bugreports about this phenomenon
  • r20005 displayed these messages when announcement support was added
  • r21916 acknowledged the possibility of empty private system messages, but did not discover the relation to affiliation changes
  • In Phab:rP21916#31564 we noticed the relation to bannign
  • XmppClient::handleMUCMessage is called with empty msg.from().resource(), empty msg.body(), msg.subtype() = 16 = gloox::Message::Normal (excluding the gloox::Message::Chat flag) and priv = true
  • gloox' MUCRoom::handleMessage is the only function that calls this handleMUCMessage function.
  • Perhaps the line if( msg.subtype() & ( Message::Chat | Message::Normal ) ) privMsg = true; in that function has a different intended meaning than the boolean logic implements
  • Since if( !msg.body().empty() || !msg.extensions().empty() ) must be true and the body is claimed to be empty, the extensions() list should be considered. It sounds like all StanzaExtensions defined in stanzaextension.h arrive here but are not parsed.
  • Changing the semi-anonymous anonymous room (real JID revelation) setting also shows a non-private room message without from
  • The popup does not occur if the room is configured as semi-anonymous.
  • r21925 recommends to use the non-anonymous room and the WFG arena23 lobby room was made non-anonymous shortly before on Nov 01st 2018. This however does not explain how the empty popup occured shortly before then (r21916) already.
  • Perhaps the README (or XMPP specs?) should be updated with regards to the semi-anonymous room setting, if it not only shows the real JIDs but also affiliation changes and possibly many more information conditionally in the StanzaExtensions

Change History (6)

comment:1 by elexis, 3 years ago

Milestone: BacklogAlpha 24

comment:2 by elexis, 3 years ago

Following #4482 / r22856 one can pass arbitrary JS properties to the JS GUI messages.

Following GlooxScriptConversions.cpp from r22891, the gloox enum values translated to JS strings are passed as such an arbitrary (additional) JS GUI property.

One can do the same for the messages and muc messages, i.e. extend the current information instead of having to try to parse the from field to see what type of message that was.

So the JS side will be able to distinguish well the gloox chat message based on the gloox enum value.

If one adds someone to the banlist in psi+ and clicks on save, the xmpp server sends the following message (captured with wireshark):

<message to='elexis3' from='arena24' id='8817943542918925313'><x xmlns=''><item jid='2' role='none' affiliation='outcast'/></x></message>

Upon unban:

<message to='elexis3' from='arena24' id='11876947812222298113'><x xmlns=''><item jid='asd' role='none' affiliation='none'/></x></message>

Currently the XMPP server only receives a message with empty subject and empty body, hence the useless empty popup.

handleMUCMessage Subtype: Normal, From: , Subject: , Body: , Private: true

Last edited 3 years ago by elexis (previous) (diff)

comment:3 by elexis, 3 years ago

Patch: Phab:D2288

comment:4 by Stan`, 2 years ago

Milestone: Alpha 24Alpha 25

Hotfixed in Phab:rP24609 real fix needs rebase

comment:5 by wraitii, 20 months ago

Milestone: Alpha 25Alpha 26

comment:6 by Stan`, 11 months ago

Milestone: Alpha 26Alpha 27

Unlikely to get done for A26

Note: See TracTickets for help on using tickets.