rooms is a proper collection now, so no need for getter on session

This commit is contained in:
Bruno Windels 2019-02-26 22:09:48 +01:00
parent 2e362d1bbd
commit 90a7989eda
2 changed files with 1 additions and 5 deletions

View file

@ -42,10 +42,6 @@ export default class Session {
return this._rooms;
}
getRoom(roomId) {
return this._rooms.get(roomId);
}
createRoom(roomId) {
const room = new Room(roomId, this._storage, this._roomUpdateCallback);
this._rooms.add(roomId, room);

View file

@ -82,7 +82,7 @@ export default class Sync extends EventEmitter {
// presence
if (response.rooms) {
parseRooms(response.rooms, (roomId, roomResponse, membership) => {
let room = this._session.getRoom(roomId);
let room = this._session.rooms.get(roomId);
if (!room) {
room = this._session.createRoom(roomId);
}