Hi,
for some reason when creating or updating a group channel, I am not able to set is_distinct on the channel. What am I missing?
the dto is as follows:
public class SendbirdChannel {
private String user_ids;
private String name;
private boolean is_public;
private boolean is_distinct;
}
thanks.
Hi @saleh1222,
Welcome to the Sendbird community! Are you utilizing the Platform API or a specific SDK?
Hi,
The platform API.
Thanks.
Hi @saleh1222,
It looks like you’re making a distinct public channel which is not possible. A channel and not be both distinct and public as someone joining the public channel would immediately break the distinctness of the channel.
Thanks for the quick response. The channel type is group though.
Hi @saleh1222,
Can you share with me the cURL request you’re making? A group channel can either be public or distinct, so it would be best to know exactly what you’re passing to the Platform API.
I think I know what the problem was. There was another channel between the 2 users that was not distinct. Hence setting the other as distinct did not just go through. but when I deleted the other channel, I managed to set the channel as distinct. Did I figure it correctly? Thanks.
Hi @saleh1222,
I’m happy to hear you were able to successfully create a distinct channel. The previously created non-distinct channel should not have impacted this issue. As a test, I just created two channels. The first was not distinct, and the second was. Both contained the same users. If possible, could you DM me your application id so I can take a quick peak at logging and just validate that nothing else was going on?
Hi @saleh1222,
Thank you for DMing me your application id. It looks like in all of your request, up until the successful channel, you were sending _distinct
instead of is_distinct
. Here is one of your requests:
{"user_ids":["[Masked Value]","[Masked Value]"],"name":"[Masked Value]","_distinct":true,"_public":false}
In your successful request, you sent the whole is_distinct
:
{"is_public":false,"user_ids":["[Masked Value]","[Masked Value]"],"is_distinct":true}
Oh, I see what happened there. thanks alot for looking into this.
Cheers.