diff options
Diffstat (limited to 'webclient/components')
-rw-r--r-- | webclient/components/matrix/event-handler-service.js | 11 | ||||
-rw-r--r-- | webclient/components/matrix/event-stream-service.js | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/webclient/components/matrix/event-handler-service.js b/webclient/components/matrix/event-handler-service.js index 8eb8a6b180..0be294d745 100644 --- a/webclient/components/matrix/event-handler-service.js +++ b/webclient/components/matrix/event-handler-service.js @@ -511,6 +511,17 @@ function(matrixService, $rootScope, $q, $timeout, mPresence) { member = room.members[user_id]; } return member; + }, + + setRoomVisibility: function(room_id, visible) { + if (!visible) { + return; + } + + var room = $rootScope.events.rooms[room_id]; + if (room) { + room.visibility = visible; + } } }; }]); diff --git a/webclient/components/matrix/event-stream-service.js b/webclient/components/matrix/event-stream-service.js index 6f92332246..5af1ab2911 100644 --- a/webclient/components/matrix/event-stream-service.js +++ b/webclient/components/matrix/event-stream-service.js @@ -120,6 +120,8 @@ angular.module('eventStreamService', []) if ("state" in room) { eventHandlerService.handleEvents(room.state, false, true); } + + eventHandlerService.setRoomVisibility(room.room_id, room.visibility); } var presence = response.data.presence; |