Page MenuHomeWildfire Games

Do not show message box in lobby for an empty message with no sender.
ClosedPublic

Authored by user1 on Jan 14 2021, 1:04 AM.

Details

Summary

In the lobby, a message box will be produced if a message is received with no from attribute. This is assumed to be a system message.
In the referenced ticket, when an affiliation is changed for any player, a message is received from the server with data about the change but with no text. This will spawn an empty message box.
This revision adds a check to make sure the length of the text attribute is greater than 0 before producing a message box or displaying the message in the chat panel.
This is a simple fix to address only the symptom of having an empty message box that must be clicked away any time a user is banned or unbanned.
There is a more complete patch that makes the client aware of different types of xmpp messages we could receive so we can handle each one appropriately. That patch needs to be reimplemented since D2412 has changed most of the code it works on. We should reimplement that patch since that would be the more ideal solution.
Ref: #5348 , D2288

Test Plan

Test that no empty message box is produced when a user is banned or unbanned AND that no blank chat message is displayed in the chat panel.
Test that a message box is still produced for system messages AND that a chat message is correctly displayed in the chat panel for system messages and private messages.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

user1 requested review of this revision.Jan 14 2021, 1:04 AM
user1 created this revision.
wraitii accepted this revision.Jan 14 2021, 9:31 AM
wraitii added a subscriber: wraitii.

This seems to fix a relatively serious issue and it's straightforward & sane in general -> accept.

The more general handling of messages may still be useful indeed, but not for A24.

This revision is now accepted and ready to land.Jan 14 2021, 9:31 AM
Owners added a subscriber: Restricted Owners Package.Jan 14 2021, 8:12 PM