stream-chat-react-native icon indicating copy to clipboard operation
stream-chat-react-native copied to clipboard

Querying for pending/accepted/rejected returns an empty array.

Open cleandevcode opened this issue 3 years ago • 2 comments

Hello, again. This is my environment.

stream-chat: 6.1.0
stream-chat-expo: ^4.1.0
react: 16.15.1
expo: ^40.0.0
react-natve: 0.63.4

I tried to invite members on the channel. This was my codebase to invite members.


  const members = [
    {
      user: {
        id: "user1",  // an admin of 'travel' channel
      },
    },
    {
      user: {
        id: "user2", // the user I am gonna invite
      },
    },
  ];


const inviteMembers = () => {
   const channel = client.channel('messaging', 'travel');
   await channel.create();
   await channel.inviteMembers(members)
}

Then after that, I am gonna query the lists of accepted, pending, and rejected. So I used this querying https://getstream.io/chat/docs/react/channel_invites/

const rejected = client.queryChannels({ invite: 'pending', });

But it returned an empty array. What is missing with my implementation?

Thanks.

cleandevcode avatar Jun 17 '22 16:06 cleandevcode