We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a414f2e commit 46b106aCopy full SHA for 46b106a
1 file changed
chats/consumers/chat.py
@@ -70,9 +70,10 @@ 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_OFFLINE, "user": {"id": self.user.id}},
+ {"type": EventType.SET_ONLINE, "user": {"id": self.user.id}},
74
)
75
76
+ # add to group to listen for general events, like online/offline
77
await self.channel_layer.group_add(
78
EventGroupType.GENERAL_EVENTS, self.channel_name
79
0 commit comments