aboutsummaryrefslogtreecommitdiff
path: root/syncapi/streams/stream_receipt.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-04-07 16:08:19 +0200
committerGitHub <noreply@github.com>2022-04-07 15:08:19 +0100
commit60ee7eef4c8ea7e17135d52d3dde9be0b54e2f55 (patch)
tree5e0330d4fbdac2f67e67338c445c4d8a3b0b68ae /syncapi/streams/stream_receipt.go
parent99ef5472959a4e4d49bd9760fcb8b3872e21fa71 (diff)
Add possibility to ignore users (#2329)
* Add ignore users * Ignore users in pushrules Add passing tests * Update sytest lists * Store ignore knowledge in the sync API * Fix copyrights Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'syncapi/streams/stream_receipt.go')
-rw-r--r--syncapi/streams/stream_receipt.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/syncapi/streams/stream_receipt.go b/syncapi/streams/stream_receipt.go
index 680f8cd8..9d7d479a 100644
--- a/syncapi/streams/stream_receipt.go
+++ b/syncapi/streams/stream_receipt.go
@@ -54,6 +54,10 @@ func (p *ReceiptStreamProvider) IncrementalSync(
// Group receipts by room, so we can create one ClientEvent for every room
receiptsByRoom := make(map[string][]types.OutputReceiptEvent)
for _, receipt := range receipts {
+ // skip ignored user events
+ if _, ok := req.IgnoredUsers.List[receipt.UserID]; ok {
+ continue
+ }
receiptsByRoom[receipt.RoomID] = append(receiptsByRoom[receipt.RoomID], receipt)
}