mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-15 01:01:31 +03:00
Display room name instead of alias
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
a075568e89
commit
cb5237a18b
1 changed files with 7 additions and 3 deletions
|
@ -329,8 +329,8 @@ class NewlinePart extends BasePart implements IBasePart {
|
||||||
}
|
}
|
||||||
|
|
||||||
class RoomPillPart extends PillPart {
|
class RoomPillPart extends PillPart {
|
||||||
constructor(displayAlias, private room: Room) {
|
constructor(resourceId: string, label: string, private room: Room) {
|
||||||
super(displayAlias, displayAlias);
|
super(resourceId, label);
|
||||||
}
|
}
|
||||||
|
|
||||||
setAvatar(node: HTMLElement) {
|
setAvatar(node: HTMLElement) {
|
||||||
|
@ -357,6 +357,10 @@ class RoomPillPart extends PillPart {
|
||||||
}
|
}
|
||||||
|
|
||||||
class AtRoomPillPart extends RoomPillPart {
|
class AtRoomPillPart extends RoomPillPart {
|
||||||
|
constructor(text: string, room: Room) {
|
||||||
|
super(text, text, room);
|
||||||
|
}
|
||||||
|
|
||||||
get type(): IPillPart["type"] {
|
get type(): IPillPart["type"] {
|
||||||
return Type.AtRoomPill;
|
return Type.AtRoomPill;
|
||||||
}
|
}
|
||||||
|
@ -521,7 +525,7 @@ export class PartCreator {
|
||||||
r.getAltAliases().includes(alias);
|
r.getAltAliases().includes(alias);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return new RoomPillPart(alias, room);
|
return new RoomPillPart(alias, room ? room.name : alias, room);
|
||||||
}
|
}
|
||||||
|
|
||||||
atRoomPill(text: string) {
|
atRoomPill(text: string) {
|
||||||
|
|
Loading…
Reference in a new issue