summary refs log tree commit diff
path: root/synapse/res/templates/notif.html
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-12-18 07:26:15 -0500
committerGitHub <noreply@github.com>2020-12-18 07:26:15 -0500
commit4136255d3cd733d3b9997f3f23a837d76cec7aaf (patch)
tree50563249055cea172e5dc3c45630195569f6ea53 /synapse/res/templates/notif.html
parentMerge remote-tracking branch 'origin/erikj/as_mau_block' into develop (diff)
downloadsynapse-4136255d3cd733d3b9997f3f23a837d76cec7aaf.tar.xz
Ensure that a URL exists in the content during push. (#8965)
This fixes an KeyError exception, after this PR the content
is just considered unknown.
Diffstat (limited to '')
-rw-r--r--synapse/res/templates/notif.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/res/templates/notif.html b/synapse/res/templates/notif.html
index 6d76064d13..0aaef97df8 100644
--- a/synapse/res/templates/notif.html
+++ b/synapse/res/templates/notif.html
@@ -29,7 +29,7 @@
                         {{ message.body_text_html }}
                     {%- elif message.msgtype == "m.notice" %}
                         {{ message.body_text_html }}
-                    {%- elif message.msgtype == "m.image" %}
+                    {%- elif message.msgtype == "m.image" and message.image_url %}
                         <img src="{{ message.image_url|mxc_to_http(640, 480, scale) }}" />
                     {%- elif message.msgtype == "m.file" %}
                         <span class="filename">{{ message.body_text_plain }}</span>