Remove events.rooms[room_id] entirely from event-handler-service.

Everything now uses modelService, but there are still one or two
minor teething problems to fix.
This commit is contained in:
Kegan Dougal 2014-11-03 12:18:22 +00:00
parent 6bc1dc4020
commit fd535183ee
4 changed files with 59 additions and 232 deletions

View file

@ -148,6 +148,17 @@ angular.module('modelService', [])
getRooms: function() {
return rooms;
},
/**
* Get the member object of a room member
* @param {String} room_id the room id
* @param {String} user_id the id of the user
* @returns {undefined | Object} the member object of this user in this room if he is part of the room
*/
getMember: function(room_id, user_id) {
var room = this.getRoom(room_id);
return room.current_room_state.members[user_id];
}
};