diff --git a/src/domain/session/rightpanel/RoomInfoViewModel.js b/src/domain/session/rightpanel/RoomInfoViewModel.js index 4525838c..d45c4994 100644 --- a/src/domain/session/rightpanel/RoomInfoViewModel.js +++ b/src/domain/session/rightpanel/RoomInfoViewModel.js @@ -5,7 +5,6 @@ export class RoomInfoViewModel extends ViewModel { constructor(options) { super(options); this._room = options.room; - this._roomSummary = this._room._summary._data; } get roomId() { @@ -13,19 +12,19 @@ export class RoomInfoViewModel extends ViewModel { } get canonicalAlias() { - return this._roomSummary.canonicalAlias; + return this._room.canonicalAlias; } get name() { - return this._roomSummary.name || this._room._heroes?._roomName || this._roomSummary.canonicalAlias; + return this._room.name; } get isEncrypted() { - return !!this._roomSummary.encryption; + return !!this._room.isEncrypted; } get memberCount() { - return this._roomSummary.joinCount; + return this._room.joinedMemberCount; } get avatarLetter() { diff --git a/src/matrix/room/BaseRoom.js b/src/matrix/room/BaseRoom.js index 531f6a1a..a6a59278 100644 --- a/src/matrix/room/BaseRoom.js +++ b/src/matrix/room/BaseRoom.js @@ -354,6 +354,14 @@ export class BaseRoom extends EventEmitter { return this.membership === "leave"; } + get canonicalAlias() { + return this._summary.data.canonicalAlias; + } + + get joinedMemberCount() { + return this._summary.data.joinCount; + } + get mediaRepository() { return this._mediaRepository; }