forked from mystiq/hydrogen-web
add roomDescription property
This commit is contained in:
parent
b6573258fb
commit
f902f255a4
1 changed files with 19 additions and 0 deletions
|
@ -33,6 +33,7 @@ export class InviteViewModel extends ViewModel {
|
|||
if (this._invite.inviter) {
|
||||
this._inviter = new RoomMemberViewModel(this._invite.inviter, mediaRepository, this.platform);
|
||||
}
|
||||
this._roomDescription = this._createRoomDescription();
|
||||
}
|
||||
|
||||
get kind() { return "invite"; }
|
||||
|
@ -67,6 +68,24 @@ export class InviteViewModel extends ViewModel {
|
|||
return null;
|
||||
}
|
||||
|
||||
_createRoomDescription() {
|
||||
const parts = [];
|
||||
if (this._invite.isPublic) {
|
||||
parts.push("Public room");
|
||||
} else {
|
||||
parts.push("Private room");
|
||||
}
|
||||
|
||||
if (this._invite.canonicalAlias) {
|
||||
parts.push(this._invite.canonicalAlias);
|
||||
}
|
||||
return parts.join(" • ")
|
||||
}
|
||||
|
||||
get roomDescription() {
|
||||
return this._roomDescription;
|
||||
}
|
||||
|
||||
get avatarTitle() {
|
||||
return this.name;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue