diff options
Diffstat (limited to 'syweb')
-rw-r--r-- | syweb/webclient/components/matrix/event-handler-service.js | 4 | ||||
-rw-r--r-- | syweb/webclient/room/room-controller.js | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/syweb/webclient/components/matrix/event-handler-service.js b/syweb/webclient/components/matrix/event-handler-service.js index efe7bf234c..e9540bd5c0 100644 --- a/syweb/webclient/components/matrix/event-handler-service.js +++ b/syweb/webclient/components/matrix/event-handler-service.js @@ -188,7 +188,9 @@ function(matrixService, $rootScope, $q, $timeout, $filter, mPresence, notificati if (event.user_id !== matrixService.config().user_id) { room.addMessageEvent(event, !isLiveEvent); - displayNotification(event); + if (isLiveEvent) { + displayNotification(event); + } } else { // we may have locally echoed this, so we should replace the event diff --git a/syweb/webclient/room/room-controller.js b/syweb/webclient/room/room-controller.js index f6a1eea70a..afa029117b 100644 --- a/syweb/webclient/room/room-controller.js +++ b/syweb/webclient/room/room-controller.js @@ -339,25 +339,24 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput', 'a } }; + // Tries to find a suitable room ID for this room. $scope.onInit = function() { console.log("onInit"); - // Does the room ID provided in the URL? + // Try to find out the room ID to load. var room_id_or_alias; - if ($routeParams.room_id_or_alias) { + if ($routeParams.room_id_or_alias) { // provided in the url room_id_or_alias = decodeURIComponent($routeParams.room_id_or_alias); } if (room_id_or_alias && '!' === room_id_or_alias[0]) { - // Yes. We can go on right now + // it's a room ID since they start with ! $scope.room_id = room_id_or_alias; $scope.room_alias = modelService.getRoomIdToAliasMapping($scope.room_id); onInit2(); } else { - // No. The URL contains the room alias. Get this alias. - if (room_id_or_alias) { - // The room alias was passed urlencoded, use it as is + if (room_id_or_alias && '#' === room_id_or_alias[0]) { $scope.room_alias = room_id_or_alias; } else { @@ -392,7 +391,6 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput', 'a }; var onInit2 = function() { - console.log("onInit2"); $scope.room = modelService.getRoom($scope.room_id); // Scroll down as soon as possible so that we point to the last message @@ -402,7 +400,7 @@ angular.module('RoomController', ['ngSanitize', 'matrixFilter', 'mFileInput', 'a // Make sure the initialSync has been before going further eventHandlerService.waitForInitialSyncCompletion().then( function() { - + console.log("initialSync is complete."); var needsToJoin = true; // The room members is available in the data fetched by initialSync |