mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 17:34:50 -04:00
Reverted patches done for SYWEB-40
This commit is contained in:
parent
704e7e9f44
commit
0db0528e8e
2 changed files with 6 additions and 12 deletions
|
@ -19,14 +19,13 @@
|
|||
angular.module('RecentsController')
|
||||
.filter('orderRecents', ["matrixService", "eventHandlerService", function(matrixService, eventHandlerService) {
|
||||
return function(rooms) {
|
||||
|
||||
var user_id = matrixService.config().user_id;
|
||||
|
||||
// Transform the dict into an array
|
||||
// The key, room_id, is already in value objects
|
||||
var filtered = [];
|
||||
angular.forEach(rooms, function(room, room_id) {
|
||||
|
||||
|
||||
// Show the room only if the user has joined it or has been invited
|
||||
// (ie, do not show it if he has been banned)
|
||||
var member = eventHandlerService.getMember(room_id, user_id);
|
||||
|
@ -35,8 +34,9 @@ angular.module('RecentsController')
|
|||
// Count users here
|
||||
// TODO: Compute it directly in eventHandlerService
|
||||
room.numUsersInRoom = eventHandlerService.getUsersCountInRoom(room_id);
|
||||
|
||||
filtered.push(room);
|
||||
}
|
||||
filtered.push(room);
|
||||
});
|
||||
|
||||
// And time sort them
|
||||
|
@ -60,4 +60,4 @@ angular.module('RecentsController')
|
|||
});
|
||||
return filtered;
|
||||
};
|
||||
}]);
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue