Distinct group chat

Chat room session creation logic 1: General chat to users when taking a walk,
Chat room session creation logic 2: Used goods transaction chat to users when trading used goods
In the case of 2, enter custom data.
If you request the chat room url of 1 while there is a chat room created with 2, even if you give the value of distict: true, the address value of the chat room created with 2 will come.

Hello @eoapps,
If channel logic #2 creates a distinct channel, then any time you pass distinct #2 with the same users, it will return the already existing channel.

thank you Tyler,

Our app needs two types of chat rooms in total

  1. Create chat rooms A to B with custom data,
  2. When creating chat rooms A to B without custom data, the existing chat room 1 is transferred.

→ Is additional setup required in the backend?

I’m not sure I entirely follow what you’re looking to achieve. So I’ll try to rephrase it to see if I understand it.

User A and User B have a 1:1 chat. The channel contains information on the data property.
At some point, a new channel needs to be created between these two users that does not have any information on the data property.

Is that correct? If so, what is the idea behind using the distinct property for channels?

  1. Product-related information is displayed at the top,
    In the case of 2, there is no product-related information.
    The two are not the same type of chat, and a separate new channel should be created in relation to this.

If there is a channel between the two that will not complete or be removed, it can be considered distinct so long as the users within the channel does not change.
The other channel should not be considered distinct.

해당 링크의 내용을 보면 가능한걸로 파악되었습니다 불가능한 걸까요?

I think we really need to better understand why you want to use distinct channels. Right now, it’s not clear what the purpose of distinct channels serves within your applicaiton. Will these product specific channesl between only User A and User B be long lived conversations? Or will they be short conversations that only occur for a small period of time?

The purposes of the two types of chat rooms with different channels are different. One is for communication between users, and the other is for product transactions. Therefore, when users A and B, whose chat rooms were created through communication, attempt to chat using a different screen for product transactions, the existing chat room for communication purposes is called. The chat room for product transactions displays basic information (images, prices, etc.) about the products that users have suggested in the chat room, but the chat room for simple communication does not need such information because it is not for product transactions, and the purpose of the conversation is also different. Therefore, two types of chat rooms are necessary.

I’d like to clarify that I’m suggesting or questioning why you’re using multiple channels. Just questioning whether distinct channels are actually necessary. None the less, if you want to use distinct channels, your best bet is to utilize a distinct channel for the core channel that will facilitate the long lasting conversations unrelated to a specific product.

Then in the channels related to a specific product, you likely don’t need distinctness since the channel won’t be long lived.

Further more, the concept of distinctness is really only beneficial if you want to ensure that the same channel_url is always returned when attempting to create a new channel between a specific set of members (and channel custom_type).

별개의 채팅방이 필요로 합니다
각각 채팅방은 사용자간의 채팅방 생성이 되는 로직과 시나리오가 완전히 다르기 때문이며,
각 시나리오에 의해서 생성된 채팅방은 목적 또한 커뮤니케이션과 상품거래이기 때문에
각각 채팅방이 필요한 것 입니다
상품거래를 목적으로 한 사용자에게 커뮤니케이션의 목적이 표시되는 채팅방을 보여줄 필요도 없고 커뮤니케이션을 목적으로하는 사용자들의 채팅방에 상품정보를 표시할 이유가 없는 것 입니다 별도로 백엔드에서 설정이나 개발이 필요한지 필요하다면 어떻게 할 수 있는건인지에 대한 정보가 필요합니다

Hello again. It looks like I didn’t clarify well enough in my previous post.
I am not telling you to use less channels. Utilize as many channels as you need to satisfy your business logic.

My hope with this conversation was to try and simplify your implementation as it doesn’t seem like distinct channels solve any particular problem for you and thus using non-distinct channels may be better. Again, you can use as many channels as you want. Distinct channels cause the same channel to be returned.

I just want to check whether it can be distinguished by giving a distinct flag.
If you can distinguish it, I wonder how it can be implemented using the Sandbird SDK.

The point of a distinct channel is to ensure the same channel_url is always returned when you create a new channel that includes the same users and custom_type. It does not provide much benefit when inspecting the channel if you already know the channel_url.

If you’re not storing the channel_url, it may be worth using just the custom_type or the data field to parse through it during the channel list query.

Thank you. It has been resolved. Thank you for your kind and quick response.