summary refs log tree commit diff
path: root/webclient/room
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-11-03 17:44:14 +0000
committerKegan Dougal <kegan@matrix.org>2014-11-03 17:44:14 +0000
commit4b3f74388570f104ebd3cae8543f1aaca1572127 (patch)
treecbbe60e0cc7c8bbdf2ce728071602bc1d1b2ea4d /webclient/room
parentVariable renaming, general cleanup. Don't feed state events from /initialSync... (diff)
downloadsynapse-4b3f74388570f104ebd3cae8543f1aaca1572127.tar.xz
Reference the room_member key on messages which adjusts for current vs old_room_state. This displays names for historical users correctly, but is off by one (referencing content not prev_content).
Diffstat (limited to 'webclient/room')
-rw-r--r--webclient/room/room.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html
index 3f4c4c57b6..cd2a5e9c23 100644
--- a/webclient/room/room.html
+++ b/webclient/room/room.html
@@ -127,14 +127,14 @@
             <tr ng-repeat="msg in room.events"
                 ng-class="(room.events[$index + 1].user_id !== msg.user_id ? 'differentUser' : '') + (msg.user_id === state.user_id ? ' mine' : '')" scroll-item>
                 <td class="leftBlock">
-                    <div class="sender" ng-hide="room.events[$index - 1].user_id === msg.user_id"> {{ msg.user_id | mUserDisplayName: room_id }}</div>
+                    <div class="sender" ng-hide="room.events[$index - 1].user_id === msg.user_id"> {{ msg.room_member.content.displayname || msg.user_id | mUserDisplayName: room_id }}</div>
                     <div class="timestamp"
                          ng-class="msg.echo_msg_state">
                         {{ (msg.origin_server_ts) | date:'MMM d HH:mm' }}
                     </div>
                 </td>
                 <td class="avatar">
-                    <img class="avatarImage" ng-src="{{ members[msg.user_id].avatar_url || 'img/default-profile.png' }}" width="32" height="32" title="{{msg.user_id}}"
+                    <img class="avatarImage" ng-src="{{ msg.room_member.content.avatar_url || 'img/default-profile.png' }}" width="32" height="32" title="{{msg.user_id}}"
                          ng-hide="room.events[$index - 1].user_id === msg.user_id || msg.user_id === state.user_id"/>
                 </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'">