mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-18 08:54:54 +03:00
Merge branch 'rei/no_imgs_in_notif_emails' into matrix-org-hotfixes
This commit is contained in:
commit
18d0f269ab
1 changed files with 1 additions and 14 deletions
|
@ -1,19 +1,6 @@
|
|||
{%- for message in notif.messages %}
|
||||
<tr class="{{ "historical_message" if message.is_historical else "message" }}">
|
||||
<td class="sender_avatar">
|
||||
{%- if loop.index0 == 0 or notif.messages[loop.index0 - 1].sender_name != notif.messages[loop.index0].sender_name %}
|
||||
{%- if message.sender_avatar_url %}
|
||||
<img alt="" class="sender_avatar" src="{{ message.sender_avatar_url|mxc_to_http(32,32) }}" />
|
||||
{%- else %}
|
||||
{%- if message.sender_hash % 3 == 0 %}
|
||||
<img class="sender_avatar" src="https://riot.im/img/external/avatar-1.png" />
|
||||
{%- elif message.sender_hash % 3 == 1 %}
|
||||
<img class="sender_avatar" src="https://riot.im/img/external/avatar-2.png" />
|
||||
{%- else %}
|
||||
<img class="sender_avatar" src="https://riot.im/img/external/avatar-3.png" />
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
</td>
|
||||
<td class="message_contents">
|
||||
{%- if loop.index0 == 0 or notif.messages[loop.index0 - 1].sender_name != notif.messages[loop.index0].sender_name %}
|
||||
|
@ -30,7 +17,7 @@
|
|||
{%- elif message.msgtype == "m.notice" %}
|
||||
{{ message.body_text_html }}
|
||||
{%- elif message.msgtype == "m.image" and message.image_url %}
|
||||
<img src="{{ message.image_url|mxc_to_http(640, 480, 'scale') }}" />
|
||||
<span class="filename">{{ message.body_text_plain }} (image)</span>
|
||||
{%- elif message.msgtype == "m.file" %}
|
||||
<span class="filename">{{ message.body_text_plain }}</span>
|
||||
{%- else %}
|
||||
|
|
Loading…
Reference in a new issue