Opened 6 years ago
Closed 5 years ago
#4877 closed defect (fixed)
Incorrect "is not a moderator anymore" message, XmppClient GUI Message should allow more than 2 properties
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 24 |
Component: | Multiplayer lobby | Keywords: | |
Cc: | Patch: | Phab:D2264,Phab:D2266 |
Description
As reported today by user1, if someone is unmuted while one is ingame and then returns from a running game to the lobby (or something along those lines), the %(nick)s is not a moderator anymore.
string can be seen in the lobby (which is wrong).
Issue described in Phab:rP19514 too.
The reason must be that the XmppClient compares the old user role against the the current user role, not against the new user role at that time of the presence change.
That could be solved easily by adding a third property to the CreateGUIMessage call.
That however runs into the issue that the timestamp is the last argument and currently ommitted. So adding a third argument would make the code uglier.
In #4482 it was attempted to create a custom ScriptInterface
for the XmppClient
and instead of using a CreateGUIMessage
, construct an actual JS::RootedObject
where we can set propertis arbitrarily.
That just segfaulted, but would be the ideal approach.
Attachments (1)
Change History (10)
by , 6 years ago
Attachment: | xmpp struct nuke_v3 added |
---|
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Priority: | Nice to Have → Must Have |
---|
As reported by user1, from the a23 lobby after Wendy was muted:
(09:15:31 AM) nani: wendy was mod ?
(09:15:32 AM) nani: lol
(09:17:07 AM) TYLER1: u sure wendy was mod?
comment:3 by , 5 years ago
Milestone: | Backlog → Alpha 24 |
---|---|
Patch: | → Phab:D2264 |
Phab:D2264 is for arbitrary JSObject support, which will make it very easy to solve the issue, in particular without making things (the struct and functions using it) worse.
It seems the fallacy was to think that it requires a new ScriptInterface, when we can reuse the one from the GUIManager. It would be needed, but only if we want to support non-visual XMPPClients, which will be necessary for the dedicated hosting. So this can be done in a separate step, as the first step will be the same with and without the custom ScriptInterface.
comment:6 by , 5 years ago
Patch: | Phab:D2264 → Phab:D2264,Phab:D2266 |
---|
comment:7 by , 5 years ago
Reproduce:
- join lobby with player and mod account
- player is muted
- player hosts a game
- player becomes unmuted during the game
- player returns to the lobby
result:
- You are not a moderator anymore.
- You have been unmuted.
expected result:
- You have been muted.
- You have been unmuted.
Step 2 and 3 are interchangeable.
comment:8 by , 5 years ago
#4482 also reports that the GUI message data format was insufficient / too rigid struct.
last WIP that never worked