How to query channels the current user is NOT a member of? #5719
Replies: 1 comment
-
|
Hi, By default the API only returns channels the user has permission to read, and for the To let users find channels they are not members of (your public/forum case), the channel type has to grant the read permission to non-members. You set that on the channel type's role permissions in the dashboard. Once non-members can read that channel type, you can query those channels without the Joining is a separate step: once a user finds a channel, they become a member by being added to it (for example For the exact permission setup, see the permissions reference in the Stream docs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In my app, Stream Channels function as Forums (Public, Private, Hidden - invite-only). How do I search for non-member Public and Private Channels? (i.e. if someone else has created a channel, and I want to be a part of it, how do I query that channel and request my membership in it?)
So far, when trying to do the same, I receive this error message:
QueryChannels failed with error: "2 channels match your query but cannot be returned because you don't have access to them. Did you forget to include {members: $in: ["xxxxxxxxxx"]}?" More information available at https://getstream.io/chat/docs/api_errors_responseBeta Was this translation helpful? Give feedback.
All reactions