mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
handle emotes & notices correctly in email notifs
This commit is contained in:
parent
c8c5bf950a
commit
58ee43d020
@ -17,11 +17,15 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="message_contents">
|
<td class="message_contents">
|
||||||
{% if loop.index0 == 0 or notif.messages[loop.index0 - 1].sender_name != notif.messages[loop.index0].sender_name %}
|
{% if loop.index0 == 0 or notif.messages[loop.index0 - 1].sender_name != notif.messages[loop.index0].sender_name %}
|
||||||
<div class="sender_name">{{ message.sender_name }}</div>
|
<div class="sender_name">{% if message.msgtype == "m.emote" %}*{% endif %} {{ message.sender_name }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="message_body">
|
<div class="message_body">
|
||||||
{% if message.msgtype == "m.text" %}
|
{% if message.msgtype == "m.text" %}
|
||||||
{{ message.body_text_html }}
|
{{ message.body_text_html }}
|
||||||
|
{% elif message.msgtype == "m.emote" %}
|
||||||
|
{{ message.body_text_html }}
|
||||||
|
{% elif message.msgtype == "m.notice" %}
|
||||||
|
{{ message.body_text_html }}
|
||||||
{% elif message.msgtype == "m.image" %}
|
{% elif message.msgtype == "m.image" %}
|
||||||
<img src="{{ message.image_url|mxc_to_http(640, 480, scale) }}" />
|
<img src="{{ message.image_url|mxc_to_http(640, 480, scale) }}" />
|
||||||
{% elif message.msgtype == "m.file" %}
|
{% elif message.msgtype == "m.file" %}
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
{% for message in notif.messages %}
|
{% for message in notif.messages %}
|
||||||
{{ message.sender_name }} ({{ message.ts|format_ts("%H:%M") }})
|
{% if message.msgtype == "m.emote" %}* {% endif %}{{ message.sender_name }} ({{ message.ts|format_ts("%H:%M") }})
|
||||||
{% if message.msgtype == "m.text" %}
|
{% if message.msgtype == "m.text" %}
|
||||||
{{ message.body_text_plain }}
|
{{ message.body_text_plain }}
|
||||||
|
{% elif message.msgtype == "m.emote" %}
|
||||||
|
{{ message.body_text_plain }}
|
||||||
|
{% elif message.msgtype == "m.notice" %}
|
||||||
|
{{ message.body_text_plain }}
|
||||||
{% elif message.msgtype == "m.image" %}
|
{% elif message.msgtype == "m.image" %}
|
||||||
{{ message.body_text_plain }}
|
{{ message.body_text_plain }}
|
||||||
{% elif message.msgtype == "m.file" %}
|
{% elif message.msgtype == "m.file" %}
|
||||||
|
Loading…
Reference in New Issue
Block a user