Is there a way to cancel invitation to a private group chat?

Hey community!

My task: start a private group chat between a customer and a seller.
I need to send chat invitations to several sellers and when one of the sellers accepts the invitation, I need to cancel all other invitations (1 customer + 1 seller (first seller who accepted the invitation) is my goal)

Please advise and thanks in advance!
Artem

@artemdavydov hi! There is no way you can cancel invitation but you can use ban to prevent others to join. I believe it is possible by using webhook https://sendbird.com/docs/chat/v3/platform-api/guides/webhooks (you have to have server side to receive webhook tho). So what I think is following scenario

  1. A buyer sends multiple invitations to sellers by calling
[groupChannel inviteUserId:sellerIds completionHandler:^(SBDError * _Nullable error) {
    // invitations were sent out
}];
  1. Listen webhook event https://sendbird.com/docs/chat/v3/platform-api/guides/webhooks#2-group_channel-join and if current # of joined users in the channel becomes 2 then immediately call https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-ban-a-user for rest of invited sellers.

Note that this approach I think there could be timing issue that seller may experience like was be able to join but being kicked out of from the channel. (in case server ban request is reached later than join request from seller side)

Thanks for your help!