summary refs log tree commit diff
path: root/webclient
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-08-13 11:09:30 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-08-13 11:09:30 +0200
commit30efb04060c3b7e4ea99e1d03da9690fe7adc5d2 (patch)
treeac0cce3a8587b076133df23a583878b3660d1da9 /webclient
parentadd in copyrights to everything, not just the synapse subdir, and add a copyr... (diff)
downloadsynapse-30efb04060c3b7e4ea99e1d03da9690fe7adc5d2.tar.xz
Display image messages from the stream
Diffstat (limited to 'webclient')
-rw-r--r--webclient/app.css8
-rw-r--r--webclient/room/room.html3
2 files changed, 10 insertions, 1 deletions
diff --git a/webclient/app.css b/webclient/app.css
index fd548c117b..13cd19a2ef 100644
--- a/webclient/app.css
+++ b/webclient/app.css
@@ -187,6 +187,14 @@ h1 {
     border: 0px ! important;
 }
 
+.image {
+    display: block;
+    max-width:320px;
+    max-height:320px;
+    width: auto;
+    height: auto;
+}
+
 .bubble {
     padding: 6px;
     padding-left: 1em;
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 276c3caa5a..600bc14eb8 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -32,7 +32,8 @@
                 <td ng-class="!msg.content.membership_target ? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : ''">
                     <div class="bubble">
                         {{ msg.content.msgtype === "m.emote" ? ("* " + (members[msg.user_id].displayname || msg.user_id) + " ") : "" }}
-                        {{ msg.content.body }}
+                        {{ msg.content.msgtype === "m.text" ? msg.content.body : "" }}
+                        <img class="image" ng-hide='msg.content.msgtype !== "m.image"' src="{{ msg.content.url }}" alt="{{ msg.content.body }}"/>
                     </div>
                 </td>
                 <td class="rightBlock">