diff options
author | Kegan Dougal <kegan@matrix.org> | 2014-10-31 16:22:15 +0000 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2014-10-31 16:22:15 +0000 |
commit | b0f0b7b75e2887be546ac7c5e1d3dabec8d7052c (patch) | |
tree | dba63317dc9697139dea272400310cada1a1d246 /webclient/room/room.html | |
parent | Hook into more of event-handler-service and mimic its functions for now. (diff) | |
download | synapse-b0f0b7b75e2887be546ac7c5e1d3dabec8d7052c.tar.xz |
room.html now displays messages from model-service. Add debugging fields. Hook up the room member *at the time* to the message so it can display the right historical member info.
Diffstat (limited to '')
-rw-r--r-- | webclient/room/room.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html index 5265f42dd8..8c1e45dfd4 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -123,10 +123,10 @@ ng-style="{ 'visibility': state.messages_visibility }" keep-scroll> <table id="messageTable" infinite-scroll="paginateMore()"> - <tr ng-repeat="msg in events.rooms[room_id].messages" - ng-class="(events.rooms[room_id].messages[$index + 1].user_id !== msg.user_id ? 'differentUser' : '') + (msg.user_id === state.user_id ? ' mine' : '')" scroll-item> + <tr ng-repeat="msg in room.events track by $index" + 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="events.rooms[room_id].messages[$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.user_id | mUserDisplayName: room_id }}</div> <div class="timestamp" ng-class="msg.echo_msg_state"> {{ (msg.origin_server_ts) | date:'MMM d HH:mm' }} @@ -134,7 +134,7 @@ </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}}" - ng-hide="events.rooms[room_id].messages[$index - 1].user_id === msg.user_id || msg.user_id === state.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'"> <div class="bubble" ng-click="openJson(msg)"> @@ -204,7 +204,7 @@ </td> <td class="rightBlock"> <img class="avatarImage" ng-src="{{ members[msg.user_id].avatar_url || 'img/default-profile.png' }}" width="32" height="32" - ng-hide="events.rooms[room_id].messages[$index - 1].user_id === msg.user_id || msg.user_id !== state.user_id"/> + ng-hide="room.events[$index - 1].user_id === msg.user_id || msg.user_id !== state.user_id"/> </td> </tr> </table> |