summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-22 17:42:53 +0100
committerKegan Dougal <kegan@matrix.org>2014-09-22 17:46:53 +0100
commitb5c9d99424b269d291973e09c8311bbae3537596 (patch)
tree1b532623287be0a026839539ab532896cab9ce36 /webclient/room
parentBump versions and changelog (diff)
downloadsynapse-b5c9d99424b269d291973e09c8311bbae3537596.tar.xz
Show display name changes in the message list.
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room.html10
1 files changed, 7 insertions, 3 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html
index db3aa193c5..c807e2afe1 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -77,10 +77,10 @@
                 </td>
                 <td ng-class="(!msg.content.membership && ('m.room.topic' !== msg.type && 'm.room.name' !== msg.type))? (msg.content.msgtype === 'm.emote' ? 'emote text' : 'text') : 'membership text'">
                     <div class="bubble">
-                        <span ng-if="'join' === msg.content.membership">
+                        <span ng-if="'join' === msg.content.membership && msg.changedKey === 'membership'">
                             {{ members[msg.state_key].displayname || msg.state_key }} joined
                         </span>
-                        <span ng-if="'leave' === msg.content.membership">
+                        <span ng-if="'leave' === msg.content.membership && msg.changedKey === 'membership'">
                             <span ng-if="msg.user_id === msg.state_key">
                                 {{ members[msg.state_key].displayname || msg.state_key }} left
                             </span>
@@ -93,7 +93,8 @@
                                 </span>
                             </span>
                         </span>
-                        <span ng-if="'invite' === msg.content.membership || 'ban' === msg.content.membership">
+                        <span ng-if="'invite' === msg.content.membership && msg.changedKey === 'membership' || 
+                                     'ban' === msg.content.membership && msg.changedKey === 'membership'">
                             {{ members[msg.user_id].displayname || msg.user_id }}
                             {{ {"invite": "invited", "ban": "banned"}[msg.content.membership] }}
                             {{ members[msg.state_key].displayname || msg.state_key }}
@@ -101,6 +102,9 @@
                                 : {{ msg.content.reason }}
                             </span>
                         </span>                        
+                        <span ng-if="msg.changedKey === 'displayname'">
+                            {{ msg.user_id }} changed their display name from {{ msg.prev_content.displayname }} to {{ msg.content.displayname }}
+                        </span>
                         
                         <span ng-show='msg.content.msgtype === "m.emote"'
                               ng-class="msg.echo_msg_state"