From 188bd548c642c32ad5cd8a9fb025a2c7c89bf0ff Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 28 Jun 2021 20:51:14 +0300 Subject: [PATCH 1/2] Let m.notice messages mark a room as unread The typescript conversion of Unread.js in matrix-org/matrix-react-sdk#6241 fixed a 6-year-old typo and stopped messages with msgtype=m.notice from being counted as unread messages. This makes it very difficult to use rooms dedicated for bot notices (like RSS or GitHub webhook bots). Signed-off-by: Tulir Asokan --- src/Unread.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/Unread.ts b/src/Unread.ts index b733f4175a..1f909630b0 100644 --- a/src/Unread.ts +++ b/src/Unread.ts @@ -43,12 +43,6 @@ export function eventTriggersUnreadCount(ev: MatrixEvent): boolean { case EventType.RoomCanonicalAlias: case EventType.RoomServerAcl: return false; - - case EventType.RoomMessage: - if (ev.getContent().msgtype === MsgType.Notice) { - return false; - } - break; } if (ev.isRedacted()) return false; From bf556722636fbdb2c0777036dd940983e9c1af5e Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Mon, 28 Jun 2021 21:07:58 +0300 Subject: [PATCH 2/2] Remove unused import Signed-off-by: Tulir Asokan --- src/Unread.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Unread.ts b/src/Unread.ts index 1f909630b0..72f0bb4642 100644 --- a/src/Unread.ts +++ b/src/Unread.ts @@ -16,7 +16,7 @@ limitations under the License. import { Room } from "matrix-js-sdk/src/models/room"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { EventType, MsgType } from "matrix-js-sdk/src/@types/event"; +import { EventType } from "matrix-js-sdk/src/@types/event"; import { MatrixClientPeg } from "./MatrixClientPeg"; import shouldHideEvent from './shouldHideEvent';