Unable to send message


In our project sometimes we are unable to send messages from React component and get the following error message “Sender is still in pending status”.
Some of our clients are unable to work because they can’t send any messages.

Please advise, how this issue can be resolved.

Hello @Evgeny_Zakharchenko

Welcome to the Sendbird community!

When you face this error, you might consider the two situations below.

Case #1:

The users might not be a joined status in the group channel.

When creating a group channel, don’t use the ‘invitation_status’ parameter, if you want to make a user join automatically. The default value is ‘joined’.

You can check what the user’s current state is via API below.

Resolution: If the issue happens, update the invitation status for the users with ‘Accept an invitation’ API. Then invited users status will be changed to ‘joined’ from ‘invited’. Once joined, the users are able to chat in a group channel.

Case #2:

Since a user is allowed to join up to 2,000 group channels, the invitation to a user who already belongs to a maximum number of group channels will be canceled automatically:

So you check the number of channels that the user joined via API below:

Resolution: If the user reached the max number of channels, in terms of reducing the Max channel count per user, the user should leave/delete a channel.

Let me know if this helps in clarifying a few things here.

Hi @Chinmaya_Gupta

We have investigated this issue and found that user has more than 2000 group channels.

In our business requirements we need to store all created channels with the history. Old channels were archived with hide channel api (Hide a channel | Chat Platform API | Sendbird Docs) and looks like these archived channels cause issue with max channels limit.

We have tried to use leave channel API, but in this approach, when all users left the channel the channel was removed too. So this approach is not suitable for our requirements.

Please advice how we can resolve the issue with max channels count and store our chat history for archived channels?

Hi @Evgeny_Zakharchenko

In terms of reducing the Max channel count per user, the user should leave/delete a channel when the user exceeds the Max channel count.

Before the users leave/delete the channel, they can store the channel URL associated with the users in their server, then later the users can rejoin the channel again and see the history of the channel’s messages.

They can find the joined channels count for each user in their dashboard and via API: Overview | Chat Platform API | Sendbird Docs

Enable chat message history from Sendbird Dashboard by navigating to Settings –> Chat –> Channels –> Group Channels –> Enable Chat History