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!

@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 (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 and if current # of joined users in the channel becomes 2 then immediately call 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!