mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Renames message event to chat_message
This commit is contained in:
parent
f4ade1ba8d
commit
2a7c3d6867
@ -20,7 +20,7 @@ $(function () {
|
|||||||
|
|
||||||
// Triggered when message is received from a user. Even when sent
|
// Triggered when message is received from a user. Even when sent
|
||||||
// by self, it get triggered after the server sends back the emit.
|
// by self, it get triggered after the server sends back the emit.
|
||||||
socket.on('message', function (data) {
|
socket.on('chat_message', function (data) {
|
||||||
addMessageToPanel(data, current_username, 'chat');
|
addMessageToPanel(data, current_username, 'chat');
|
||||||
console.log(data, current_username);
|
console.log(data, current_username);
|
||||||
});
|
});
|
||||||
|
@ -131,7 +131,7 @@ class ChatModeWeb:
|
|||||||
"""Sent by a client when the user entered a new message.
|
"""Sent by a client when the user entered a new message.
|
||||||
The message is sent to all people in the server."""
|
The message is sent to all people in the server."""
|
||||||
emit(
|
emit(
|
||||||
"message",
|
"chat_message",
|
||||||
{"username": session.get("name"), "msg": message["msg"]},
|
{"username": session.get("name"), "msg": message["msg"]},
|
||||||
broadcast=True,
|
broadcast=True,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user