mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
rooms is a proper collection now, so no need for getter on session
This commit is contained in:
parent
2e362d1bbd
commit
90a7989eda
@ -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 New Issue
Block a user