HomeWildfire Games

XmppClient cleanup.

Description

XmppClient cleanup.

Allow XmppClient to use arbitrary property names in GUIMessages.
Remove duplication by calling CreateGUIMessage when receiving chat messages.
Inline PushGUINotification.
Use std::string in the GUIMessage because every data source is of that type.
Apply the wstring_from_utf8 conversion to ensure correct display of less common UTF characters instead in the GuiPollMessage method.
Add room subject change chat message.

Differential Revision: https://code.wildfiregames.com/D835
Refs #4482
Comments by fpre, Vladislav and leper

Event Timeline

elexis added inline comments.Jun 11 2018, 1:01 AM
/ps/trunk/binaries/data/mods/public/gui/lobby/prelobby.js
177

Concern: This string comes from rP19205, it is only triggered for the error case, not the disconnected case. "disconnected" always provided a nonempty string. So the string is currently never shown. I guess that could have remained a reason to keep it in C++.

Imarok raised a concern with this commit.Jun 11 2018, 1:08 AM
Imarok added a subscriber: Imarok.

Cause of the "registered too many accounts within one hour" message not shown anymore.

This commit now has outstanding concerns.Jun 11 2018, 1:08 AM
elexis requested verification of this commit.Jun 11 2018, 6:02 PM
This commit now requires verification by auditors.Jun 11 2018, 6:02 PM

Maybe I've forgotten something, but why should that have been fixed?

elexis added a comment.Sep 1 2018, 3:15 PM

I posted the wrong commit ID. By searching for the one posted one finds the fix rP21847.

Imarok resigned from this commit.Sep 4 2018, 11:35 AM

Ok, works

This commit no longer requires audit.Sep 4 2018, 11:35 AM

Seems cleaning the lobby subject doesnt broadcast the change instantly, players only notice upon relog, for non-empty subjects it does broadcast changes instantly, and it should be gloox fault since I see the update in pidgin and I dont see empty changes being filtered in 0ad xmppclient / glooxwrapper.

/ps/trunk/binaries/data/mods/public/gui/lobby/lobby.js
155

msg.nick is non-empty

The MUC service MUST reflect the message to all other occupants with a 'from' address equal to the room JID or to the occupant JID that corresponds to the sender of the subject change:

https://xmpp.org/extensions/xep-0045.html#subject-mod