mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 00:39:37 -05: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
|
||||
// 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');
|
||||
console.log(data, current_username);
|
||||
});
|
||||
|
@ -131,7 +131,7 @@ class ChatModeWeb:
|
||||
"""Sent by a client when the user entered a new message.
|
||||
The message is sent to all people in the server."""
|
||||
emit(
|
||||
"message",
|
||||
"chat_message",
|
||||
{"username": session.get("name"), "msg": message["msg"]},
|
||||
broadcast=True,
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user