Added event handler service which.. handles events. More specifically, it $broadcasts events depending on their type, and does processing on events (shuffling keys, adding events to $rootScope so displays will automatically update, sending delivery receipts, and so on). Some of this logic was previously contained in the RoomController, which fails the moment you add >1 room into the mix, hence requiring a Service to handle events, rather than having each individual controller maintain their part of the world.

This commit is contained in:
Kegan Dougal 2014-08-15 11:31:13 +01:00
parent 8bf3994c2e
commit 5dbceaf5a4
5 changed files with 124 additions and 32 deletions

View file

@ -21,7 +21,8 @@ var matrixWebClient = angular.module('matrixWebClient', [
'RoomController',
'RoomsController',
'matrixService',
'eventStreamService'
'eventStreamService',
'eventHandlerService'
]);
matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',