Private read receipts (#2789)

Implement behaviours for `m.read.private` receipts.
This commit is contained in:
Neil Alexander 2022-10-11 12:27:21 +01:00 committed by GitHub
parent 3920b9f9b6
commit 0a9aebdf01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 66 additions and 33 deletions

View file

@ -67,6 +67,10 @@ func (p *ReceiptStreamProvider) IncrementalSync(
if _, ok := req.IgnoredUsers.List[receipt.UserID]; ok {
continue
}
// Don't send private read receipts to other users
if receipt.Type == "m.read.private" && req.Device.UserID != receipt.UserID {
continue
}
receiptsByRoom[receipt.RoomID] = append(receiptsByRoom[receipt.RoomID], receipt)
}