mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-30 16:46:13 -05:00
Only start event streaming after having set up the controllers.
This commit is contained in:
parent
5670da1c1e
commit
2e1ab9db08
@ -15,7 +15,8 @@ for port in "8080" "8081" "8082"; do
|
||||
-f "$DIR/$port.log" \
|
||||
-d "$DIR/$port.db" \
|
||||
-vv \
|
||||
-D --pid-file "$DIR/$port.pid"
|
||||
-D --pid-file "$DIR/$port.pid"\
|
||||
-w
|
||||
done
|
||||
|
||||
echo "Starting webclient on port 8000..."
|
||||
|
@ -53,7 +53,7 @@ angular.module('MatrixWebClientController', ['matrixService'])
|
||||
};
|
||||
|
||||
if (matrixService.isUserLoggedIn()) {
|
||||
eventStreamService.resume();
|
||||
// eventStreamService.resume();
|
||||
}
|
||||
|
||||
// Logs the user out
|
||||
|
@ -80,6 +80,6 @@ matrixWebClient.run(['$location', 'matrixService', 'eventStreamService', functio
|
||||
$location.path("login");
|
||||
}
|
||||
else {
|
||||
eventStreamService.resume();
|
||||
// eventStreamService.resume();
|
||||
}
|
||||
}]);
|
||||
|
@ -106,6 +106,16 @@ angular.module('eventStreamService', [])
|
||||
// FIXME: We are discarding all the messages.
|
||||
matrixService.rooms().then(
|
||||
function(response) {
|
||||
var rooms = response.data.rooms;
|
||||
for (var i = 0; i < rooms.length; ++i) {
|
||||
var room = rooms[i];
|
||||
if ("state" in room) {
|
||||
for (var j = 0; j < room.state.length; ++j) {
|
||||
eventHandlerService.handleEvents(room.state[j], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var presence = response.data.presence;
|
||||
for (var i = 0; i < presence.length; ++i) {
|
||||
eventHandlerService.handleEvent(presence[i], false);
|
||||
|
@ -328,6 +328,7 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
|
||||
var chunk = response.data.chunk[i];
|
||||
updateMemberList(chunk);
|
||||
}
|
||||
eventStreamService.resume();
|
||||
},
|
||||
function(error) {
|
||||
$scope.feedback = "Failed get member list: " + error.data.error;
|
||||
|
@ -17,8 +17,8 @@ limitations under the License.
|
||||
'use strict';
|
||||
|
||||
angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload', 'eventHandlerService'])
|
||||
.controller('RoomsController', ['$scope', '$location', 'matrixService', 'mFileUpload', 'eventHandlerService',
|
||||
function($scope, $location, matrixService, mFileUpload, eventHandlerService) {
|
||||
.controller('RoomsController', ['$scope', '$location', 'matrixService', 'mFileUpload', 'eventHandlerService', 'eventStreamService',
|
||||
function($scope, $location, matrixService, mFileUpload, eventHandlerService, eventStreamService) {
|
||||
|
||||
$scope.rooms = {};
|
||||
$scope.public_rooms = [];
|
||||
@ -113,6 +113,8 @@ angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload',
|
||||
$scope.public_rooms = assignRoomAliases(response.data.chunk);
|
||||
}
|
||||
);
|
||||
|
||||
eventStreamService.resume();
|
||||
};
|
||||
|
||||
$scope.createNewRoom = function(room_id, isPrivate) {
|
||||
|
Loading…
Reference in New Issue
Block a user