Skip to content

Commit af1771d

Browse files
committed
Added chat_id and message_id to content
1 parent bcd411d commit af1771d

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

chats/consumers.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ async def __process_edit_direct_message_event(self, event):
427427
content = await sync_to_async(
428428
lambda: (DirectChatMessageListSerializer(msg)).data
429429
)()
430+
content["chat_id"] = chat_id
431+
content["message_id"] = content["id"]
432+
del content["id"]
430433

431434
# send message to user's channel
432435
other_user_channel = cache.get(get_user_channel_cache_key(other_user), None)
@@ -465,6 +468,10 @@ async def __process_edit_project_message_event(self, event, room_name):
465468
content = await sync_to_async(
466469
lambda: (ProjectChatMessageListSerializer(message)).data
467470
)()
471+
content["chat_id"] = chat_id
472+
content["message_id"] = content["id"]
473+
del content["id"]
474+
468475
await self.channel_layer.group_send(
469476
room_name,
470477
{"type": EventType.EDIT_MESSAGE, "content": content},

0 commit comments

Comments
 (0)