mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 06:10:21 +00:00
Fix bug which prevented the number of users being visible on the recents view.
This commit is contained in:
parent
fd535183ee
commit
9b1ca64a75
3 changed files with 4 additions and 5 deletions
|
@ -540,13 +540,12 @@ function(matrixService, $rootScope, $q, $timeout, mPresence, notificationService
|
|||
|
||||
var room = modelService.getRoom(room_id);
|
||||
memberCount = 0;
|
||||
|
||||
for (var i in room.current_room_state.members) {
|
||||
if (!room.current_room_state.members.hasOwnProperty(i)) continue;
|
||||
|
||||
var member = room.current_room_state.members[i];
|
||||
|
||||
if ("join" === member.membership) {
|
||||
if ("join" === member.content.membership) {
|
||||
memberCount = memberCount + 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@ angular.module('RecentsController')
|
|||
// (ie, do not show it if he has been banned)
|
||||
var member = modelService.getMember(room_id, user_id);
|
||||
room.recent.me = member;
|
||||
if (member && ("invite" === member.membership || "join" === member.membership)) {
|
||||
if ("invite" === member.membership) {
|
||||
if (member && ("invite" === member.content.membership || "join" === member.content.membership)) {
|
||||
if ("invite" === member.content.membership) {
|
||||
room.recent.inviter = member.user_id;
|
||||
}
|
||||
// Count users here
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
{{ room.room_id | mRoomName }}
|
||||
</td>
|
||||
<td class="recentsRoomSummaryUsersCount">
|
||||
<span ng-show="undefined !== room.numUsersInRoom">
|
||||
<span ng-show="undefined !== room.recent.numUsersInRoom">
|
||||
{{ room.recent.numUsersInRoom || '1' }} {{ room.recent.numUsersInRoom == 1 ? 'user' : 'users' }}
|
||||
</span>
|
||||
</td>
|
||||
|
|
Loading…
Reference in a new issue