forked from Nexus/nexus
use canonical alias ahead of room id for mentions
This commit is contained in:
parent
6e6bcaaad1
commit
a7e60b9464
1 changed files with 30 additions and 21 deletions
|
|
@ -42,9 +42,11 @@ class const RoomOverlay(
|
|||
? null
|
||||
: Text(room.metadata!.topic!, maxLines: 1),
|
||||
onTap: () {
|
||||
final vias = ref.watch(ViaController.provider(room)).viaQuery;
|
||||
final alias = room.metadata?.canonicalAlias;
|
||||
addTag(
|
||||
id: "[#$name](matrix:roomid/${room.metadata?.id.substring(1)}$vias)",
|
||||
id: alias == null
|
||||
? "[#$name](matrix:roomid/${room.metadata?.id.substring(1)}${ref.read(ViaController.provider(room)).viaQuery})"
|
||||
: "[#$name](matrix:r/${alias.substring(1)})",
|
||||
name:
|
||||
room.metadata?.canonicalAlias?.localpart ??
|
||||
room.metadata?.id ??
|
||||
|
|
|
|||
Loading…
Reference in a new issue