mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-12-14 09:23:51 +01:00
Don't send read receipts for fake JIDs
This commit is contained in:
parent
c2520c14db
commit
0d977bc610
1 changed files with 3 additions and 1 deletions
|
@ -2278,7 +2278,9 @@ func (portal *Portal) HandleMatrixReadReceipt(sender *User, eventID id.EventID,
|
||||||
}
|
}
|
||||||
groupedMessages := make(map[types.JID][]types.MessageID)
|
groupedMessages := make(map[types.JID][]types.MessageID)
|
||||||
for _, msg := range messages {
|
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)
|
portal.log.Debugfln("Sending read receipts by %s: %v", sender.JID, groupedMessages)
|
||||||
for messageSender, ids := range groupedMessages {
|
for messageSender, ids := range groupedMessages {
|
||||||
|
|
Loading…
Reference in a new issue