From 5710b7559e532a436d3e2630c5d1ca7872c648a3 Mon Sep 17 00:00:00 2001 From: Pranav Raj S Date: Wed, 26 Jan 2022 17:52:08 -0800 Subject: [PATCH] fix: Fix email template to render the chat bubble properly (#3858) --- .../conversation_assignment.liquid | 32 ++++++++--------- .../conversation_creation.liquid | 36 +++++++++---------- .../conversation_mention.liquid | 32 ++++++++--------- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_assignment.liquid b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_assignment.liquid index 18cd21e75..d59672dc8 100644 --- a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_assignment.liquid +++ b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_assignment.liquid @@ -4,25 +4,25 @@ {% for chat_message in conversation.recent_messages %}
- {% if chat_message.sender == user.available_name %} -

You

- {% else %} -

{{chat_message.sender}}

- {% endif %} +

+ {% if chat_message.sender == user.available_name %} + You + {% else %} + {{chat_message.sender}} + {% endif %} +

-
-

- {% if chat_message.content %} - {{chat_message.content}} - {% endif %} +

+ {% if chat_message.content %} + {{chat_message.content}} + {% endif %} - {% if chat_message.attachments %} - {% for attachment in chat_message.attachments %} - Attachment [Click here to view] - {% endfor %} - {% endif %} -

+ {% if chat_message.attachments %} + {% for attachment in chat_message.attachments %} + Attachment [Click here to view] + {% endfor %} + {% endif %}
{% endfor %} diff --git a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_creation.liquid b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_creation.liquid index d7dac7cca..e2d952777 100644 --- a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_creation.liquid +++ b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_creation.liquid @@ -7,24 +7,24 @@ {% for chat_message in conversation.recent_messages %}
- {% if chat_message.sender == user.available_name %} -

You

- {% else %} -

{{chat_message.sender}}

+

+ {% if chat_message.sender == user.available_name %} + You + {% else %} + {{chat_message.sender}} + {% endif %} +

+
+ +
+ {% if chat_message.content %} + {{chat_message.content}} + {% endif %} + + {% if chat_message.attachments %} + {% for attachment in chat_message.attachments %} + Attachment [Click here to view] + {% endfor %} {% endif %}
- -
-

- {% if chat_message.content %} - {{chat_message.content}} - {% endif %} - - {% if chat_message.attachments %} - {% for attachment in chat_message.attachments %} - Attachment [Click here to view] - {% endfor %} - {% endif %} -

-
{% endfor %} diff --git a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_mention.liquid b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_mention.liquid index 00cb13e1e..193c0c015 100644 --- a/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_mention.liquid +++ b/app/views/mailers/agent_notifications/conversation_notifications_mailer/conversation_mention.liquid @@ -8,25 +8,25 @@

Previous messages:

{% for chat_message in conversation.recent_messages %}
- {% if chat_message.sender == user.available_name %} -

You

- {% else %} -

{{chat_message.sender}}

- {% endif %} +

+ {% if chat_message.sender == user.available_name %} + You + {% else %} + {{chat_message.sender}} + {% endif %} +

-
-

- {% if chat_message.content %} - {{chat_message.content}} - {% endif %} +

+ {% if chat_message.content %} + {{chat_message.content}} + {% endif %} - {% if chat_message.attachments %} - {% for attachment in chat_message.attachments %} - Attachment [Click here to view] - {% endfor %} - {% endif %} -

+ {% if chat_message.attachments %} + {% for attachment in chat_message.attachments %} + Attachment [Click here to view] + {% endfor %} + {% endif %}
{% endfor %}