diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js index 492ec08bc..112b3ad96 100644 --- a/webclient/components/matrix/event-handler-service.js +++ b/webclient/components/matrix/event-handler-service.js @@ -256,7 +256,7 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) { // could be a membership change, display name change, etc. // Find out which one. var memberChanges = undefined; - if (event.content.prev !== event.content.membership) { + if (event.prev_content && (event.prev_content.membership !== event.content.membership)) { memberChanges = "membership"; } else if (event.prev_content && (event.prev_content.displayname !== event.content.displayname)) { diff --git a/webclient/recents/recents.html b/webclient/recents/recents.html index fe6a2f636..a52b215c7 100644 --- a/webclient/recents/recents.html +++ b/webclient/recents/recents.html @@ -42,12 +42,12 @@ {{lastMsg.state_key | mUserDisplayName: room.room_id }} left - + {{ lastMsg.user_id | mUserDisplayName: room.room_id }} - {{ {"join": "kicked", "ban": "unbanned"}[lastMsg.content.prev] }} + {{ {"invite": "kicked", "join": "kicked", "ban": "unbanned"}[lastMsg.prev_content.membership] }} {{ lastMsg.state_key | mUserDisplayName: room.room_id }} - + : {{ lastMsg.content.reason }} @@ -55,7 +55,7 @@ {{ lastMsg.user_id | mUserDisplayName: room.room_id }} {{ {"invite": "invited", "ban": "banned"}[lastMsg.content.membership] }} {{ lastMsg.state_key | mUserDisplayName: room.room_id }} - + : {{ lastMsg.content.reason }} diff --git a/webclient/room/room.html b/webclient/room/room.html index a3f8aee7a..ce2c58190 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -91,11 +91,11 @@ {{ members[msg.state_key].displayname || msg.state_key }} left - + {{ members[msg.user_id].displayname || msg.user_id }} - {{ {"join": "kicked", "ban": "unbanned"}[msg.content.prev] }} + {{ {"invite": "kicked", "join": "kicked", "ban": "unbanned"}[msg.prev_content.membership] }} {{ members[msg.state_key].displayname || msg.state_key }} - + : {{ msg.content.reason }} @@ -105,7 +105,7 @@ {{ members[msg.user_id].displayname || msg.user_id }} {{ {"invite": "invited", "ban": "banned"}[msg.content.membership] }} {{ members[msg.state_key].displayname || msg.state_key }} - + : {{ msg.content.reason }}