From 4ba5b4b55d67b4188d551916e0707f456a6af787 Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Wed, 3 Sep 2014 11:38:24 +0200 Subject: Do not show banned people in member list. Format ban events strings in room and recent flows --- webclient/recents/recents.html | 4 ++-- webclient/room/room-controller.js | 5 +++++ webclient/room/room.html | 5 +++-- 3 files changed, 10 insertions(+), 4 deletions(-) (limited to 'webclient') diff --git a/webclient/recents/recents.html b/webclient/recents/recents.html index db3b0fb32f..9978e08b13 100644 --- a/webclient/recents/recents.html +++ b/webclient/recents/recents.html @@ -23,8 +23,8 @@
{{ room.lastMsg.user_id }} - {{ {"join": "joined", "leave": "left", "invite": "invited"}[room.lastMsg.content.membership] }} - {{ room.lastMsg.content.membership === "invite" ? (room.lastMsg.state_key || '') : '' }} + {{ {"join": "joined", "leave": "left", "invite": "invited", "ban": "banned"}[msg.content.membership] }} + {{ (msg.content.membership === "invite" || msg.content.membership === "ban") ? (msg.state_key || '') : '' }}
diff --git a/webclient/room/room-controller.js b/webclient/room/room-controller.js index fcd24c2749..48ddda62cc 100644 --- a/webclient/room/room-controller.js +++ b/webclient/room/room-controller.js @@ -161,6 +161,11 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput']) var updateMemberList = function(chunk) { if (chunk.room_id != $scope.room_id) return; + // Ignore banned people + if ("ban" === chunk.membership) { + return; + } + // set target_user_id to keep things clear var target_user_id = chunk.state_key; diff --git a/webclient/room/room.html b/webclient/room/room.html index e672b1d7e2..05e87387a5 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -50,8 +50,9 @@
{{ members[msg.user_id].displayname || msg.user_id }} - {{ {"join": "joined", "leave": "left", "invite": "invited"}[msg.content.membership] }} - {{ msg.content.membership === "invite" ? (msg.state_key || '') : '' }} + {{ {"join": "joined", "leave": "left", "invite": "invited", "ban": "banned"}[msg.content.membership] }} + {{ (msg.content.membership === "invite" || msg.content.membership === "ban") ? (msg.state_key || '') : '' }} + -- cgit 1.4.1