mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +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;
|
return this._rooms;
|
||||||
}
|
}
|
||||||
|
|
||||||
getRoom(roomId) {
|
|
||||||
return this._rooms.get(roomId);
|
|
||||||
}
|
|
||||||
|
|
||||||
createRoom(roomId) {
|
createRoom(roomId) {
|
||||||
const room = new Room(roomId, this._storage, this._roomUpdateCallback);
|
const room = new Room(roomId, this._storage, this._roomUpdateCallback);
|
||||||
this._rooms.add(roomId, room);
|
this._rooms.add(roomId, room);
|
||||||
|
@ -82,7 +82,7 @@ export default class Sync extends EventEmitter {
|
|||||||
// presence
|
// presence
|
||||||
if (response.rooms) {
|
if (response.rooms) {
|
||||||
parseRooms(response.rooms, (roomId, roomResponse, membership) => {
|
parseRooms(response.rooms, (roomId, roomResponse, membership) => {
|
||||||
let room = this._session.getRoom(roomId);
|
let room = this._session.rooms.get(roomId);
|
||||||
if (!room) {
|
if (!room) {
|
||||||
room = this._session.createRoom(roomId);
|
room = this._session.createRoom(roomId);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user