diff options
author | Till <2353100+S7evinK@users.noreply.github.com> | 2022-04-07 16:08:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 15:08:19 +0100 |
commit | 60ee7eef4c8ea7e17135d52d3dde9be0b54e2f55 (patch) | |
tree | 5e0330d4fbdac2f67e67338c445c4d8a3b0b68ae /syncapi/streams/stream_invite.go | |
parent | 99ef5472959a4e4d49bd9760fcb8b3872e21fa71 (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_invite.go')
-rw-r--r-- | syncapi/streams/stream_invite.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/syncapi/streams/stream_invite.go b/syncapi/streams/stream_invite.go index 70374c6a..ddac9be2 100644 --- a/syncapi/streams/stream_invite.go +++ b/syncapi/streams/stream_invite.go @@ -54,6 +54,10 @@ func (p *InviteStreamProvider) IncrementalSync( } for roomID, inviteEvent := range invites { + // skip ignored user events + if _, ok := req.IgnoredUsers.List[inviteEvent.Sender()]; ok { + continue + } ir := types.NewInviteResponse(inviteEvent) req.Response.Rooms.Invite[roomID] = *ir } |