Skip to content

Commit

Permalink
Do not show room id instead of canonical alias
Browse files Browse the repository at this point in the history
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
  • Loading branch information
MidhunSureshR committed Jun 1, 2021
1 parent 8dfdd6c commit fae94bd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/domain/session/rightpanel/RoomInfoViewModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ export class RoomInfoViewModel extends ViewModel {
}

get roomId() {
return this._roomSummary.canonicalAlias || this._room.id;
return this._room.id;
}

get canonicalAlias() {
return this._roomSummary.canonicalAlias;
}

get name() {
Expand Down
7 changes: 6 additions & 1 deletion src/platform/web/ui/session/rightpanel/RoomInfoView.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class RoomInfoView extends TemplateView {
t.div({ className: "RoomAvatar" },
[t.view(new AvatarView(vm, 52)), this._createEncryptionIcon(vm.isEncrypted)]),
t.div({ className: "RoomName" }, [t.h2(vm.name)]),
t.div({ className: "RoomId" }, [text(vm.roomId)]),
this._createRoomAliasDisplay(vm),
t.div({ className: "SidebarRow_collection" },
[
this._createSideBarRow("People", vm.memberCount, { MemberCount: true }),
Expand All @@ -21,6 +21,11 @@ export class RoomInfoView extends TemplateView {
]);
}

_createRoomAliasDisplay(vm) {
return vm.canonicalAlias ? tag.div({ className: "RoomId" }, [text(vm.canonicalAlias)]) :
"";
}

_createSideBarRow(label, value, labelClass, valueClass) {
const labelClassString = classNames({ SidebarLabel: true, ...labelClass });
const valueClassString = classNames({ SidebarValue: true, ...valueClass });
Expand Down

0 comments on commit fae94bd

Please sign in to comment.