This commit is contained in:
aqu415
2022-02-15 21:06:02 +08:00
parent 2782fda765
commit 2c5db12e04
2 changed files with 9 additions and 3 deletions
+1
View File
@@ -24,6 +24,7 @@ class ChatConsumer(WebsocketConsumer):
# Receive message from WebSocket
def receive(self, text_data):
# Send message to room group
print(text_data)
async_to_sync(self.channel_layer.group_send)(
self.room_group_name,
{