Fix room alias mention triggering room-wide notifications (#2562)

* fix: prevent room alias mentions from triggering @room notifications

* fix: Simplify room mention to exact match on @room
This commit is contained in:
Santhoshkumar044 2026-01-12 17:51:00 +05:30 committed by GitHub
parent 5a48671b19
commit d1a3d378dc

View file

@ -212,9 +212,10 @@ export const getMentions = (mx: MatrixClient, roomId: string, editor: Editor): M
if (node.type === BlockType.CodeBlock) return;
if (node.type === BlockType.Mention) {
if (node.id === getCanonicalAliasOrRoomId(mx, roomId)) {
if (node.name === '@room') {
mentionData.room = true;
}
if (isUserId(node.id) && node.id !== mx.getUserId()) {
mentionData.users.add(node.id);
}