Opened 7 years ago
Closed 7 years ago
#4688 closed defect (fixed)
Lobby - Error when receiving messages sent directly by the server
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 23 |
Component: | Multiplayer lobby | Keywords: | |
Cc: | Patch: |
Description
When selecting the "Set message of the day and send to online users" as a lobby moderator in option in pidgin, the following JS error occurs with alpha 22:
WARNING: JavaScript warning: gui/lobby/lobby.js line 232 reference to undefined property msg.from WARNING: JavaScript warning: gui/lobby/lobby.js line 232 Script value conversion check failed: v.isString() || v.isNumber() (got type undefined)
Attachments (1)
Change History (16)
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Milestone: | Backlog → Alpha 23 |
---|---|
Priority: | If Time Permits → Should Have |
Unless someone else is sending the message of the day, other message types can trigger that warning too. Apparently it's not rare.
comment:3 by , 7 years ago
I think I experienced it when enabling the lobby chat log for the first time.
comment:4 by , 7 years ago
(I have that each I connect to the lobby with a new account - it's the way I reproduce it)
edit: as stanislas69 said
comment:5 by , 7 years ago
svn lobby that is? When I connect to the a22 or svn lobby I don't get the error message (but I had it few days ago again when I didn't send such a mesage of the day).
comment:6 by , 7 years ago
Each time I connect on a22 lobby with a new account.
comment:7 by , 7 years ago
Is there a solution to this problem? These annoying warnings always cause messages to fail on the server.
by , 7 years ago
Attachment: | server_pm.jpg added |
---|
comment:8 by , 7 years ago
It was also reported here https://wildfiregames.com/forum/index.php?/topic/22747-lobby-warning/
As fatherbushido said, the warning can also be triggered when creating a new lobby account (not however when just enabling chat backlog for the first time, nor when switching accounts or the like).
This way I could record the weird package. It seems to be a server welcome message, but that however is currently disabled. I joined the Alpha 23 room, but the message says it's the alpha 21 room and that alpha 22 has been released, so not sure where that's coming from.
Notice that this isn't even the Alpha 21 subject, as that is currently (it's red not green for example):
elexis has set the subject to: [color="255 0 0"]Alpha 22 has been released. Check play0ad.com for download information. Ya está liberada la nueva versión de 0 .A.D. (Alpha 22). Para descargarla e informarte sobre su instalación, visita play0ad.com. Alpha 22 foi lançado. Acesse play0ad.com para maiores informações e download. [/color]
It's not the ejabberd welcome message for new accounts either:
{mod_register, [ %% %% After successful registration, the user receives %% a message with this subject and body. %% %% {welcome_message, {"Welcome!", %% "Welcome to a Jabber service powered by Debian. " %% "For information about Jabber visit " %% "http://www.jabber.org"}}, %% Replace it with 'none' if you don't want to send such message: {welcome_message, none},
So to me it seems that we should rather display these messages and configure to server to not send unintentional ones.
comment:9 by , 7 years ago
Summary: | Lobby - Error when receiving the Message of the day → Lobby - Error when receiving messages sent directly by the server |
---|
comment:10 by , 7 years ago
But that's the message that Pidgin sends out, unless we don't use Pidgin to send a group message.
comment:12 by , 7 years ago
scythetwirler gave the clue that the quoted message above is in fact the message of the day. It is sent to any registering account for any reason.
We came to the conclusion that we should support them, open a message box and show it in the chat.
comment:13 by , 7 years ago
So there are two known ways to trigger that error. 1. "message of the day" and 2. "announcements", see https://www.ejabberd.im/files/doc/guide.html#htoc33. The according code is here https://github.com/processone/ejabberd/blob/master/src/mod_announce.erl.
However I couldn't reproduce receiving such a message upon every login. I only get the error once per message sent for both announcements and message of the day.
Since we will almost never use this feature and since pidgin also only shows "servername: <message body>" without showing the <message subject>, I think not knowing all ways to trigger this message, just showing a message box and chat line will be sufficient to close this case code-wise.
However, if this is implemented, then gameboy might get a message box saying "hello" each time he joins the lobby instead of a warning and might be equally annoyed (so the forum thread must be closed as works-for-me or solved by resolving gameboy's ejabberd configuration I guess).
Perhaps the "hello" message gameboy receives is not the one sent from pidgin but configured in the ejabberd config or code.
There is a patch which does that: https://www.ejabberd.im/node/4857.
Today, I tested it, and it does exist.