From 73e02463cf6e267fdba950d0d231f98f95bc7994 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 21 Oct 2022 09:19:52 +0100 Subject: [PATCH] Allow `m.read.private` to clear notifications (#2811) Otherwise if a user switches to private read receipts, they may not be able to clear notification counts. --- userapi/consumers/clientapi.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userapi/consumers/clientapi.go b/userapi/consumers/clientapi.go index c220d35c..79f1bf06 100644 --- a/userapi/consumers/clientapi.go +++ b/userapi/consumers/clientapi.go @@ -81,7 +81,7 @@ func (s *OutputReceiptEventConsumer) onMessage(ctx context.Context, msgs []*nats readPos := msg.Header.Get(jetstream.EventID) evType := msg.Header.Get("type") - if readPos == "" || evType != "m.read" { + if readPos == "" || (evType != "m.read" && evType != "m.read.private") { return true }