We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 46b106a commit 21afcd4Copy full SHA for 21afcd4
1 file changed
chats/consumers/chat.py
@@ -70,7 +70,7 @@ async def connect(self):
70
# notify everyone that this user is online
71
await self.channel_layer.group_send(
72
EventGroupType.GENERAL_EVENTS,
73
- {"type": EventType.SET_ONLINE, "user": {"id": self.user.id}},
+ {"type": EventType.SET_ONLINE, "content": {"user_id": self.user.id}},
74
)
75
76
# add to group to listen for general events, like online/offline
@@ -93,7 +93,8 @@ async def disconnect(self, close_code):
93
94
# TODO: add a User extra-small serializer for this?
95
96
- room_name, {"type": EventType.SET_OFFLINE, "user": {"id": self.user.id}}
+ room_name,
97
+ {"type": EventType.SET_OFFLINE, "content": {"user_id": self.user.id}},
98
99
100
async def receive_json(self, content, **kwargs):
0 commit comments