summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmmanuel ROHEE <erohee@amdocs.com>2014-09-04 09:08:34 +0200
committerEmmanuel ROHEE <erohee@amdocs.com>2014-09-04 09:08:34 +0200
commit82cf76a8f963ee242e90b401b31d9da88fd493eb (patch)
treea2d0dadb5126a2b7b8d318b19b0d70ed9c343fca
parentMerge branch 'master' of github.com:matrix-org/synapse into develop (diff)
downloadsynapse-82cf76a8f963ee242e90b401b31d9da88fd493eb.tar.xz
Report ban/unban messages to recents lists
Diffstat (limited to '')
-rw-r--r--webclient/recents/recents.html27
1 files changed, 19 insertions, 8 deletions
diff --git a/webclient/recents/recents.html b/webclient/recents/recents.html
index 9978e08b13..4db9e2ae90 100644
--- a/webclient/recents/recents.html
+++ b/webclient/recents/recents.html
@@ -16,15 +16,26 @@
             <tr>
                 <td colspan="2" class="recentsRoomSummary">
 
-                    <div ng-show="room.membership === 'invite'" >
-                        {{ room.inviter }} invited you
-                    </div>
-
                     <div ng-hide="room.membership === 'invite'" ng-switch="room.lastMsg.type" >
-                         <div ng-switch-when="m.room.member">
-                            {{ room.lastMsg.user_id }}
-                            {{ {"join": "joined", "leave": "left", "invite": "invited", "ban": "banned"}[msg.content.membership] }}
-                            {{ (msg.content.membership === "invite" || msg.content.membership === "ban") ? (msg.state_key || '') : '' }}
+                        <div ng-switch-when="m.room.member">
+                            <span ng-if="'join' === room.lastMsg.content.membership">
+                                {{ room.lastMsg.state_key }} joined
+                            </span>
+                            <span ng-if="'leave' === room.lastMsg.content.membership">
+                                <span ng-if="room.lastMsg.user_id === room.lastMsg.state_key">
+                                    {{room.lastMsg.state_key }} left
+                                </span>
+                                <span ng-if="room.lastMsg.user_id !== room.lastMsg.state_key">
+                                    {{ room.lastMsg.user_id }}
+                                    {{ {"join": "kicked", "ban": "unbanned"}[room.lastMsg.content.prev] }}
+                                    {{ room.lastMsg.state_key }}
+                                </span>
+                            </span>
+                            <span ng-if="'invite' === room.lastMsg.content.membership || 'ban' === room.lastMsg.content.membership">
+                                {{ room.lastMsg.user_id }}
+                                {{ {"invite": "invited", "ban": "banned"}[room.lastMsg.content.membership] }}
+                                {{ room.lastMsg.state_key }}
+                            </span>
                         </div>
 
                         <div ng-switch-when="m.room.message">