projects
/
rainny.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c757b89
)
fix room not opening when two rooms has same alias (#2387)
author
Ajay Bura
<32841439+ajbura@users.noreply.github.com>
Fri, 11 Jul 2025 11:00:30 +0000
(16:30 +0530)
committer
GitHub
<noreply@github.com>
Fri, 11 Jul 2025 11:00:30 +0000
(21:00 +1000)
src/app/utils/matrix.ts
patch
|
blob
|
history
diff --git
a/src/app/utils/matrix.ts
b/src/app/utils/matrix.ts
index a495e8d5980adf52d56183be5b443e958c7dfcb0..4b695724d459bbc6433911b21e9b715554968b95 100644
(file)
--- a/
src/app/utils/matrix.ts
+++ b/
src/app/utils/matrix.ts
@@
-50,7
+50,11
@@
export const getCanonicalAliasOrRoomId = (mx: MatrixClient, roomId: string): str
const room = mx.getRoom(roomId);
if (!room) return roomId;
if (getStateEvent(room, StateEvent.RoomTombstone) !== undefined) return roomId;
- return room.getCanonicalAlias() || roomId;
+ const alias = room.getCanonicalAlias();
+ if (alias && getCanonicalAliasRoomId(mx, alias) === roomId) {
+ return alias;
+ }
+ return roomId;
};
export const getImageInfo = (img: HTMLImageElement, fileOrBlob: File | Blob): IImageInfo => {