BCH
February 23, 2022, 6:38pm
1
Before creating the channel, Our setting is
var autoAccept = true;
sb.setChannelInvitationPreference(autoAccept, function (response, error) {
if (error) {
console.log(error)
return;
}
});
Once channel gets created,
groupChannel.acceptInvitation(function (response, error) {
if (error) {
}
});
is giving error saying "Invitation not found "
Tyler
February 23, 2022, 8:48pm
2
Hi @BCH ,
Welcome to the Sendbird community!
What you’ve described seems like expected behavior. If you are setting setChannelInvitationPreference
to make autoAccept = true
, then there is no invitation to accept when you create the channel as it’s already automatically accepted.
BCH
February 24, 2022, 2:56am
4
Hi @Tyler ,
Thank you for your response.
Is anything wrong I m doing, why am I getting the error “Invitation not found” and no message shows up in the channel after this error
Tyler
February 24, 2022, 5:10am
5
Hi again,
You do not need to call acceptInvite if autoAccept is true. Don’t call acceptInvite and you shouldn’t get an error.
BCH
February 24, 2022, 5:30am
6
If new members get added to the channel after the channel creation, also do we not needed to call invite and accept?
Please confirm @Tyler
Tyler
February 24, 2022, 5:41am
7
You need to invite the users. However, if autoAccept is set to true, which it is in your example, you do NOT need to call accept.
BCH
February 24, 2022, 5:46am
8
Thank you @Tyler for your clarification.