Skip to content

Commit efa34fa

Browse files
committed
Fixed content assignment
1 parent f474cc4 commit efa34fa

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

chats/consumers.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,16 @@ async def __process_new_direct_message_event(self, event: Event):
143143
reply_to=event.content["reply_to"],
144144
)
145145

146-
content = (
147-
{
148-
"type": EventType.NEW_MESSAGE,
149-
"content": {
150-
"message_id": msg.id,
151-
"chat_id": msg.chat_id,
152-
"author_id": msg.author.pk,
153-
"text": msg.text,
154-
"created_at": msg.created_at.timestamp(),
155-
},
146+
content = {
147+
"type": EventType.NEW_MESSAGE,
148+
"content": {
149+
"message_id": msg.id,
150+
"chat_id": msg.chat_id,
151+
"author_id": msg.author.pk,
152+
"text": msg.text,
153+
"created_at": msg.created_at.timestamp(),
156154
},
157-
)
155+
}
158156
# send message to user's channel
159157
other_user_channel = cache.get(get_user_channel_cache_key(other_user), None)
160158
await self.channel_layer.send(self.channel_name, content)

0 commit comments

Comments
 (0)