Skip to content

Commit ca154fc

Browse files
committed
return message with its date
1 parent b635125 commit ca154fc

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

classroom/consumers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ async def receive(self, text_data):
6262
"type": 'chat_message',
6363
"id": message.id,
6464
"user": message.user.username,
65+
"date": message.date.strftime("%Y-%m-%d"),
6566
"avatar": 'https://static.vecteezy.com/system/resources/previews/024/983/914/non_2x/simple-user-default-icon-free-png.png',
6667
"text": message.text,
6768
}

0 commit comments

Comments
 (0)