forked from mystiq/hydrogen-web
rooms is a proper collection now, so no need for getter on session
This commit is contained in:
parent
2e362d1bbd
commit
90a7989eda
2 changed files with 1 additions and 5 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue