fix: Fix email template to render the chat bubble properly (#3858)

This commit is contained in:
Pranav Raj S
2022-01-26 17:52:08 -08:00
committed by GitHub
parent 8e6d8e7654
commit 5710b7559e
3 changed files with 50 additions and 50 deletions

View File

@@ -4,25 +4,25 @@
{% for chat_message in conversation.recent_messages %}
<div>
{% if chat_message.sender == user.available_name %}
<h4 style="margin: 0;">You</h4>
{% else %}
<h4 style="margin: 0;">{{chat_message.sender}}</h4>
{% endif %}
<h4 style="margin: 0;">
{% if chat_message.sender == user.available_name %}
You
{% else %}
{{chat_message.sender}}
{% endif %}
</h4>
</div>
<div>
<p style="padding: 10px 20px; margin: 5px 0 20px 0; background: #F2F3F7; border-radius: 10px; display: inline-block; font-family: 'Helvetica Neue',Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
{% if chat_message.content %}
{{chat_message.content}}
{% endif %}
<div style="padding: 10px 20px; margin: 5px 0 20px 0; background: #F2F3F7; border-radius: 10px; display: inline-block; font-family: 'Helvetica Neue',Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
{% if chat_message.content %}
{{chat_message.content}}
{% endif %}
{% if chat_message.attachments %}
{% for attachment in chat_message.attachments %}
Attachment [<a href="{{ attachment }}" _target="blank">Click here to view</a>]
{% endfor %}
{% endif %}
</p>
{% if chat_message.attachments %}
{% for attachment in chat_message.attachments %}
Attachment [<a href="{{ attachment }}" _target="blank">Click here to view</a>]
{% endfor %}
{% endif %}
</div>
{% endfor %}

View File

@@ -7,24 +7,24 @@
{% for chat_message in conversation.recent_messages %}
<div>
{% if chat_message.sender == user.available_name %}
<h4 style="margin: 0;">You</h4>
{% else %}
<h4 style="margin: 0;">{{chat_message.sender}}</h4>
<h4 style="margin: 0;">
{% if chat_message.sender == user.available_name %}
You
{% else %}
{{chat_message.sender}}
{% endif %}
</h4>
</div>
<div style="padding: 10px 20px; margin: 5px 0 20px 0; background: #F2F3F7; border-radius: 10px; display: inline-block; font-family: 'Helvetica Neue',Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
{% if chat_message.content %}
{{chat_message.content}}
{% endif %}
{% if chat_message.attachments %}
{% for attachment in chat_message.attachments %}
Attachment [<a href="{{ attachment }}" _target="blank">Click here to view</a>]
{% endfor %}
{% endif %}
</div>
<div>
<p style="padding: 10px 20px; margin: 5px 0 20px 0; background: #F2F3F7; border-radius: 10px; display: inline-block; font-family: 'Helvetica Neue',Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
{% if chat_message.content %}
{{chat_message.content}}
{% endif %}
{% if chat_message.attachments %}
{% for attachment in chat_message.attachments %}
Attachment [<a href="{{ attachment }}" _target="blank">Click here to view</a>]
{% endfor %}
{% endif %}
</p>
</div>
{% endfor %}

View File

@@ -8,25 +8,25 @@
<p><b>Previous messages:</b></p>
{% for chat_message in conversation.recent_messages %}
<div>
{% if chat_message.sender == user.available_name %}
<h4 style="margin: 0;">You</h4>
{% else %}
<h4 style="margin: 0;">{{chat_message.sender}}</h4>
{% endif %}
<h4 style="margin: 0;">
{% if chat_message.sender == user.available_name %}
You
{% else %}
{{chat_message.sender}}
{% endif %}
</h4>
</div>
<div>
<p style="padding: 10px 20px; margin: 5px 0 20px 0; background: #F2F3F7; border-radius: 10px; display: inline-block; text-align: start; unicode-bidi: plaintext;">
{% if chat_message.content %}
{{chat_message.content}}
{% endif %}
<div style="padding: 10px 20px; margin: 5px 0 20px 0; background: #F2F3F7; border-radius: 10px; display: inline-block; font-family: 'Helvetica Neue',Tahoma,Arial,sans-serif; text-align: start; unicode-bidi: plaintext;">
{% if chat_message.content %}
{{chat_message.content}}
{% endif %}
{% if chat_message.attachments %}
{% for attachment in chat_message.attachments %}
Attachment [<a href="{{ attachment }}" _target="blank">Click here to view</a>]
{% endfor %}
{% endif %}
</p>
{% if chat_message.attachments %}
{% for attachment in chat_message.attachments %}
Attachment [<a href="{{ attachment }}" _target="blank">Click here to view</a>]
{% endfor %}
{% endif %}
</div>
{% endfor %}
<p>