summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-03 19:29:21 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-03 19:29:36 +0200
commit78087617d1e7d6d976bbd12e2f55213199c9eb1b (patch)
tree7b50533953e6e21b1211a5b28046e68304419414 /webclient/room
parentMerge branch 'develop' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-78087617d1e7d6d976bbd12e2f55213199c9eb1b.tar.xz
Fixed used of state_key instead of user_id in member events.
Needed to split into 2 conditional spans for grammar reason
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room.html11
1 files changed, 7 insertions, 4 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html
index e29f511ecf..4b6a00bffa 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -48,11 +48,14 @@
                 </td>
                 <td ng-class="!msg.content.membership ? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : 'membership text'">
                     <div class="bubble">
-                        <span ng-show='msg.type === "m.room.member"'>
+                        <span ng-if="'join' === msg.content.membership || 'leave' === msg.content.membership">
+                            {{ members[msg.state_key].displayname || msg.state_key }}
+                            {{ {"join": "joined", "leave": "left"}[msg.content.membership] }}
+                        </span>
+                        <span ng-if="'invite' === msg.content.membership || 'ban' === msg.content.membership">
                             {{ members[msg.user_id].displayname || msg.user_id }}
-                            {{ {"join": "joined", "leave": "left", "invite": "invited", "ban": "banned"}[msg.content.membership] }}
-                            {{ (msg.content.membership === "invite" || msg.content.membership === "ban") ? (msg.state_key || '') : '' }}
-
+                            {{ {"invite": "invited", "ban": "banned"}[msg.content.membership] }}
+                            {{ msg.state_key }}
                         </span>
                         <span ng-show='msg.content.msgtype === "m.emote"' ng-bind-html="'* ' + (members[msg.user_id].displayname || msg.user_id) + ' ' + msg.content.body | linky:'_blank'"/>
                         <span ng-show='msg.content.msgtype === "m.text"' ng-bind-html="((msg.content.msgtype === 'm.text') ? msg.content.body : '') | linky:'_blank'"/>