Skip to content

Commit

Permalink
fix msg handler
Browse files Browse the repository at this point in the history
  • Loading branch information
AlisoSouza committed Nov 27, 2024
1 parent 7824124 commit adab2ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nexus/projects/websockets/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ def receive(self, text_data=None, bytes_data=None):
async_to_sync(self.channel_layer.group_send)(
self.room_group_name,
{
"type": "pong",
"type": "chat_message",
"message": message,
"message_type": message_type,
}
)

def pong(self, event):
def chat_message(self, event):
mtype = {"ping": "pong"}
message = event["message"]
message_type = event["message_type"]
Expand Down

0 comments on commit adab2ab

Please sign in to comment.