diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2022-10-11 12:27:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 12:27:21 +0100 |
commit | 0a9aebdf011921680e5b0646bf50d7900423aa69 (patch) | |
tree | ae111f8aba12c73a0d4c4ec32f3e109d401693e3 /syncapi | |
parent | 3920b9f9b6155db69822d0dbcd36acb1eaa51c34 (diff) |
Private read receipts (#2789)
Implement behaviours for `m.read.private` receipts.
Diffstat (limited to 'syncapi')
-rw-r--r-- | syncapi/streams/stream_receipt.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/syncapi/streams/stream_receipt.go b/syncapi/streams/stream_receipt.go index bba91102..97781507 100644 --- a/syncapi/streams/stream_receipt.go +++ b/syncapi/streams/stream_receipt.go @@ -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) } |