summary refs log tree commit diff
path: root/res/templates/notif.html
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-28 15:55:53 +0100
committerDavid Baker <dave@matrix.org>2016-04-28 15:55:53 +0100
commit4845c7359de6c1ad1e7132653939e44ee8ff9156 (patch)
tree613021b7b17878bfeebe6b9b28d216e139864280 /res/templates/notif.html
parentpep8 (diff)
downloadsynapse-4845c7359de6c1ad1e7132653939e44ee8ff9156.tar.xz
Support image notifs
Diffstat (limited to 'res/templates/notif.html')
-rw-r--r--res/templates/notif.html12
1 files changed, 8 insertions, 4 deletions
diff --git a/res/templates/notif.html b/res/templates/notif.html
index aa6ed1e061..bdff2786ff 100644
--- a/res/templates/notif.html
+++ b/res/templates/notif.html
@@ -17,10 +17,14 @@
                 <div class="sender_name">{{ message.sender_name }}</div>
                 <div class="message_time">{{ message.ts|format_ts("%H:%M") }}</div>
                 <div class="message_body">
-                    {% if message.format == "org.matrix.custom.html" %}
-                        {{ message.body_text_html }}
-                    {% else %}
-                        {{ message.body_text_plain }}
+                    {% if message.msgtype == "m.text" %}
+                        {% if message.format == "org.matrix.custom.html" %}
+                            {{ message.body_text_html }}
+                        {% else %}
+                            {{ message.body_text_plain }}
+                        {% endif %}
+                    {% elif message.msgtype == "m.image" %}
+                        <img src="{{ message.image_url|mxc_to_http(640, 480, scale) }}" />
                     {% endif %}
                 </div>
             </div>