This repository was 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
Include a simple message in email notifications that include encrypted content #8545
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
58534dd
Include a simple message in notification emails for encrypted messages.
clokep 9ede5eb
Better whitespace control in templates.
clokep d0b2bfa
Changelog.
clokep a2fa409
Lint.
clokep f3c936f
Remove bogus elif clause.
clokep 7219ec7
Update message for invalid events.
clokep File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.