I'm trying out Stream's chat API. It is possible to enable multi-tenancy, so that users can only search for other contacts that are in the same teams as themselves. I want to query for a user's contacts. If you do that you have to specify a team filter like so:
Client.shared.queryUsers(filter: .contains("teams", "Chicago Bulls"))
Of course I would like to not hardcode the team name for other users that aren't members of the Chicago Bulls. How do I do that? There's no teams
properties on User
in the Swift SDK as far as I can see, so you can't just do Client.shared.user
.
Support is added at https://github.com/GetStream/stream-chat-swift/pull/295 Grab the new version.