mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-15 11:03:51 +01:00
Start the events stream once the app starts (if credentials are in cache) or once the user gets logged in
This commit is contained in:
parent
660129deb1
commit
6ac298f2f1
4 changed files with 4 additions and 9 deletions
|
@ -33,7 +33,7 @@ angular.module('MatrixWebClientController', ['matrixService', 'mPresence', 'even
|
|||
});
|
||||
|
||||
if (matrixService.isUserLoggedIn()) {
|
||||
// eventStreamService.resume();
|
||||
eventStreamService.resume();
|
||||
mPresence.start();
|
||||
}
|
||||
|
||||
|
|
|
@ -79,13 +79,11 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
|
|||
$httpProvider.interceptors.push('AccessTokenInterceptor');
|
||||
}]);
|
||||
|
||||
matrixWebClient.run(['$location', 'matrixService', 'eventStreamService', function($location, matrixService, eventStreamService) {
|
||||
matrixWebClient.run(['$location', 'matrixService', function($location, matrixService) {
|
||||
|
||||
// If user auth details are not in cache, go to the login page
|
||||
if (!matrixService.isUserLoggedIn()) {
|
||||
eventStreamService.stop();
|
||||
$location.path("login");
|
||||
}
|
||||
else {
|
||||
// eventStreamService.resume();
|
||||
}
|
||||
|
||||
}]);
|
||||
|
|
|
@ -45,8 +45,6 @@ angular.module('HomeController', ['matrixService', 'eventHandlerService', 'Recen
|
|||
$scope.public_rooms = matrixService.assignRoomAliases(response.data.chunk);
|
||||
}
|
||||
);
|
||||
|
||||
eventStreamService.resume();
|
||||
};
|
||||
|
||||
$scope.createNewRoom = function(room_id, isPrivate) {
|
||||
|
|
|
@ -342,7 +342,6 @@ angular.module('RoomController', ['ngSanitize', 'mFileInput', 'mUtilities'])
|
|||
var chunk = response.data.chunk[i];
|
||||
updateMemberList(chunk);
|
||||
}
|
||||
eventStreamService.resume();
|
||||
},
|
||||
function(error) {
|
||||
$scope.feedback = "Failed get member list: " + error.data.error;
|
||||
|
|
Loading…
Reference in a new issue