Fix wrong person bug in chatbox

This commit is contained in:
cuom1999 2020-06-15 21:44:29 -05:00
parent fe3807b60d
commit 07f511c1a4

View file

@ -35,7 +35,7 @@ class ChatConsumer(AsyncWebsocketConsumer):
message = text_data_json['message'] message = text_data_json['message']
author = self.scope['user'] author = self.scope['user']
author = Profile.objects.get(id=author.id) author = Profile.objects.get(user_id=author.id)
message['author'] = author.username message['author'] = author.username
message['css_class'] = author.css_class message['css_class'] = author.css_class