Correctly use provided filters (#2339)

* Apply filters correctly

* Fix issues; Use prepareWithFilters

* Update gmsl & tests

* go.mod..

* PR comments
This commit is contained in:
Till 2022-04-11 09:05:23 +02:00 committed by GitHub
parent b4b2fbc36b
commit 69f2ff7c82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 109 additions and 67 deletions

View file

@ -423,8 +423,12 @@ func (p *PDUStreamProvider) addIgnoredUsersToFilter(ctx context.Context, req *ty
return err
}
req.IgnoredUsers = *ignores
userList := make([]string, 0, len(ignores.List))
for userID := range ignores.List {
eventFilter.NotSenders = append(eventFilter.NotSenders, userID)
userList = append(userList, userID)
}
if len(userList) > 0 {
eventFilter.NotSenders = &userList
}
return nil
}