This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include a simple message in email notifications that include encrypte…
…d content (#8545)
- Loading branch information
Showing
9 changed files
with
107 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Fix a long standing bug where email notifications for encrypted messages were blank. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
{% for message in notif.messages %} | ||
{% if message.msgtype == "m.emote" %}* {% endif %}{{ message.sender_name }} ({{ message.ts|format_ts("%H:%M") }}) | ||
{% if message.msgtype == "m.text" %} | ||
{%- for message in notif.messages %} | ||
{%- if message.event_type == "m.room.encrypted" %} | ||
An encrypted message. | ||
{%- elif message.event_type == "m.room.message" %} | ||
{%- if message.msgtype == "m.emote" %}* {%- endif %}{{ message.sender_name }} ({{ message.ts|format_ts("%H:%M") }}) | ||
{%- if message.msgtype == "m.text" %} | ||
{{ message.body_text_plain }} | ||
{% elif message.msgtype == "m.emote" %} | ||
{%- elif message.msgtype == "m.emote" %} | ||
{{ message.body_text_plain }} | ||
{% elif message.msgtype == "m.notice" %} | ||
{%- elif message.msgtype == "m.notice" %} | ||
{{ message.body_text_plain }} | ||
{% elif message.msgtype == "m.image" %} | ||
{%- elif message.msgtype == "m.image" %} | ||
{{ message.body_text_plain }} | ||
{% elif message.msgtype == "m.file" %} | ||
{%- elif message.msgtype == "m.file" %} | ||
{{ message.body_text_plain }} | ||
{% endif %} | ||
{% endfor %} | ||
{%- else %} | ||
A message with unrecognised content. | ||
{%- endif %} | ||
{%- endif %} | ||
{%- endfor %} | ||
|
||
View {{ room.title }} at {{ notif.link }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
<table class="room"> | ||
<tr class="room_header"> | ||
<td class="room_avatar"> | ||
{% if room.avatar_url %} | ||
{%- if room.avatar_url %} | ||
<img alt="" src="{{ room.avatar_url|mxc_to_http(48,48) }}" /> | ||
{% else %} | ||
{% if room.hash % 3 == 0 %} | ||
{%- else %} | ||
{%- if room.hash % 3 == 0 %} | ||
<img alt="" src="https://riot.im/img/external/avatar-1.png" /> | ||
{% elif room.hash % 3 == 1 %} | ||
{%- elif room.hash % 3 == 1 %} | ||
<img alt="" src="https://riot.im/img/external/avatar-2.png" /> | ||
{% else %} | ||
{%- else %} | ||
<img alt="" src="https://riot.im/img/external/avatar-3.png" /> | ||
{% endif %} | ||
{% endif %} | ||
{%- endif %} | ||
{%- endif %} | ||
</td> | ||
<td class="room_name" colspan="2"> | ||
{{ room.title }} | ||
</td> | ||
</tr> | ||
{% if room.invite %} | ||
{%- if room.invite %} | ||
<tr> | ||
<td></td> | ||
<td> | ||
<a href="{{ room.link }}">Join the conversation.</a> | ||
</td> | ||
<td></td> | ||
</tr> | ||
{% else %} | ||
{% for notif in room.notifs %} | ||
{% include 'notif.html' with context %} | ||
{% endfor %} | ||
{% endif %} | ||
{%- else %} | ||
{%- for notif in room.notifs %} | ||
{%- include 'notif.html' with context %} | ||
{%- endfor %} | ||
{%- endif %} | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{{ room.title }} | ||
|
||
{% if room.invite %} | ||
{%- if room.invite %} | ||
You've been invited, join at {{ room.link }} | ||
{% else %} | ||
{% for notif in room.notifs %} | ||
{% include 'notif.txt' with context %} | ||
{% endfor %} | ||
{% endif %} | ||
{%- else %} | ||
{%- for notif in room.notifs %} | ||
{%- include 'notif.txt' with context %} | ||
{%- endfor %} | ||
{%- endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters