Adjust some calls for bot accounts

This commit is contained in:
Tulir Asokan
2023-02-27 01:12:06 +02:00
parent ce4d05bb11
commit 71d1689776
3 changed files with 24 additions and 12 deletions

View File

@@ -1548,6 +1548,10 @@ func (portal *Portal) HandleMatrixReadReceipt(brUser bridge.User, eventID id.Eve
return
}
}
if !sender.Session.IsUser {
// Drop read receipts from bot users (after checking for the thread auto-join stuff)
return
}
msg := portal.bridge.DB.Message.GetByMXID(portal.Key, eventID)
if msg == nil {
msg = portal.bridge.DB.Message.GetClosestBefore(portal.Key, discordThreadID, receipt.Timestamp)