Don't send read receipts for fake JIDs

This commit is contained in:
Tulir Asokan 2021-12-16 10:35:52 +02:00
parent c2520c14db
commit 0d977bc610

View file

@ -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 {