From 90a7989eda19c4b2ab3d19053cd27efd525a6646 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 26 Feb 2019 22:09:48 +0100 Subject: [PATCH] rooms is a proper collection now, so no need for getter on session --- src/matrix/session.js | 4 ---- src/matrix/sync.js | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/matrix/session.js b/src/matrix/session.js index 912965e5..e030a3dd 100644 --- a/src/matrix/session.js +++ b/src/matrix/session.js @@ -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); diff --git a/src/matrix/sync.js b/src/matrix/sync.js index 542b64b4..7f44d0a5 100644 --- a/src/matrix/sync.js +++ b/src/matrix/sync.js @@ -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); }