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 <tulir@maunium.net>
This commit is contained in:
Tulir Asokan 2021-06-28 20:51:14 +03:00
parent a8f5b7ebae
commit 188bd548c6

View File

@ -43,12 +43,6 @@ export function eventTriggersUnreadCount(ev: MatrixEvent): boolean {
case EventType.RoomCanonicalAlias: case EventType.RoomCanonicalAlias:
case EventType.RoomServerAcl: case EventType.RoomServerAcl:
return false; return false;
case EventType.RoomMessage:
if (ev.getContent().msgtype === MsgType.Notice) {
return false;
}
break;
} }
if (ev.isRedacted()) return false; if (ev.isRedacted()) return false;