This repository has been archived on 2022-08-19. You can view files and clone it, but cannot push or open issues or pull requests.
hydrogen-web/src/domain/session/rightpanel/RoomInfoViewModel.js

26 lines
553 B
JavaScript
Raw Normal View History

import { ViewModel } from "../../ViewModel.js";
export class RoomInfoViewModel extends ViewModel {
constructor(options) {
super(options);
this._room = options.room;
this._roomSummary = this._room._summary._data;
}
get roomId() {
return this._room.id;
}
get name() {
return this._roomSummary.name || this._room._heroes._roomName;
}
get isEncrypted() {
return !!this._roomSummary.encryption;
}
get memberCount() {
return this._roomSummary.joinCount;
}
}