From 0d977bc6109f11fbfd2679e369c2809aa1ed0a74 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 16 Dec 2021 10:35:52 +0200 Subject: [PATCH] Don't send read receipts for fake JIDs --- portal.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/portal.go b/portal.go index 8bdf59f..0c8686a 100644 --- a/portal.go +++ b/portal.go @@ -2278,7 +2278,9 @@ func (portal *Portal) HandleMatrixReadReceipt(sender *User, eventID id.EventID, } groupedMessages := make(map[types.JID][]types.MessageID) for _, msg := range messages { - groupedMessages[msg.Sender] = append(groupedMessages[msg.Sender], msg.JID) + if !msg.IsFakeJID() { + groupedMessages[msg.Sender] = append(groupedMessages[msg.Sender], msg.JID) + } } portal.log.Debugfln("Sending read receipts by %s: %v", sender.JID, groupedMessages) for messageSender, ids := range groupedMessages {