Display room name instead of alias

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-02-12 14:21:07 +01:00
parent a075568e89
commit cb5237a18b
No known key found for this signature in database
GPG Key ID: 9760693FDD98A790
1 changed files with 7 additions and 3 deletions

View File

@ -329,8 +329,8 @@ class NewlinePart extends BasePart implements IBasePart {
}
class RoomPillPart extends PillPart {
constructor(displayAlias, private room: Room) {
super(displayAlias, displayAlias);
constructor(resourceId: string, label: string, private room: Room) {
super(resourceId, label);
}
setAvatar(node: HTMLElement) {
@ -357,6 +357,10 @@ class RoomPillPart extends PillPart {
}
class AtRoomPillPart extends RoomPillPart {
constructor(text: string, room: Room) {
super(text, text, room);
}
get type(): IPillPart["type"] {
return Type.AtRoomPill;
}
@ -521,7 +525,7 @@ export class PartCreator {
r.getAltAliases().includes(alias);
});
}
return new RoomPillPart(alias, room);
return new RoomPillPart(alias, room ? room.name : alias, room);
}
atRoomPill(text: string) {