Skip to content

Commit 21afcd4

Browse files
committed
fix typo user: id: int -> content: user_id: int
1 parent 46b106a commit 21afcd4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

chats/consumers/chat.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ async def connect(self):
7070
# notify everyone that this user is online
7171
await self.channel_layer.group_send(
7272
EventGroupType.GENERAL_EVENTS,
73-
{"type": EventType.SET_ONLINE, "user": {"id": self.user.id}},
73+
{"type": EventType.SET_ONLINE, "content": {"user_id": self.user.id}},
7474
)
7575

7676
# add to group to listen for general events, like online/offline
@@ -93,7 +93,8 @@ async def disconnect(self, close_code):
9393

9494
# TODO: add a User extra-small serializer for this?
9595
await self.channel_layer.group_send(
96-
room_name, {"type": EventType.SET_OFFLINE, "user": {"id": self.user.id}}
96+
room_name,
97+
{"type": EventType.SET_OFFLINE, "content": {"user_id": self.user.id}},
9798
)
9899

99100
async def receive_json(self, content, **kwargs):

0 commit comments

Comments
 (0)