mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 08:56:04 -04:00
Send mail notifs with a plaintext part too
This commit is contained in:
parent
b2c04da8dc
commit
40d40e470d
5 changed files with 50 additions and 7 deletions
12
res/templates/notif.txt
Normal file
12
res/templates/notif.txt
Normal file
|
@ -0,0 +1,12 @@
|
|||
{% for message in notif.messages %}
|
||||
{{ message.sender_name }} ({{ message.ts|format_ts("%H:%M") }})
|
||||
{% if message.msgtype == "m.text" %}
|
||||
{{ message.body_text_plain }}
|
||||
{% elif message.msgtype == "m.image" %}
|
||||
{{ message.body_text_plain }}
|
||||
{% elif message.msgtype == "m.file" %}
|
||||
{{ message.body_text_plain }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
View at {{ notif.link }}
|
10
res/templates/notif_mail.txt
Normal file
10
res/templates/notif_mail.txt
Normal file
|
@ -0,0 +1,10 @@
|
|||
Hi {{ user_display_name }},
|
||||
|
||||
{{ summary_text }}
|
||||
|
||||
{% for room in rooms %}
|
||||
{% include 'room.txt' with context %}
|
||||
{% endfor %}
|
||||
|
||||
You can disable these notifications at {{ unsubscribe_link }}
|
||||
|
6
res/templates/room.txt
Normal file
6
res/templates/room.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
{{ room.title }}
|
||||
You've been invited, join at {{ room.link }}
|
||||
|
||||
{% for notif in room.notifs %}
|
||||
{% include 'notif.txt' with context %}
|
||||
{% endfor %}
|
Loading…
Add table
Add a link
Reference in a new issue