diff --git a/osinaweb/support/consumers.py b/osinaweb/support/consumers.py index b2f09388..bbda2923 100644 --- a/osinaweb/support/consumers.py +++ b/osinaweb/support/consumers.py @@ -120,7 +120,7 @@ class TicketRoomConsumer(WebsocketConsumer): def typing_handler(self, event): context = { - 'user': self.scope['user'] + 'typing_user': self.scope['user'] } html = render_to_string("details_templates/partials/typing-message.html", context=context) self.send(text_data=json.dumps({ diff --git a/osinaweb/support/templates/details_templates/partials/typing-message.html b/osinaweb/support/templates/details_templates/partials/typing-message.html index a54a52b4..d66ea623 100644 --- a/osinaweb/support/templates/details_templates/partials/typing-message.html +++ b/osinaweb/support/templates/details_templates/partials/typing-message.html @@ -1,24 +1,24 @@
- {% if user.customerprofile %} - {% if user.customerprofile.image %} - {% else %}
- {{ user.first_name.0 }}{{ user.last_name.0 }} + {{ typing_user.first_name.0 }}{{ typing_user.last_name.0 }}
{% endif %} {% elif user.staffprofile %} {% if user.staffprofile.image %} - {% else %}
- {{ user.first_name.0 }}{{ user.last_name.0 }} + {{ typing_user.first_name.0 }}{{ typing_user.last_name.0 }}
{% endif %} {% endif %} @@ -28,6 +28,6 @@

- {{user.first_name}} is typing...

+ {{typing_user.first_name}} is typing...

\ No newline at end of file