1:1 Conversation channel name

I’m using the UIKit and I’m want to create a conversational channel 1:1 between two users.

My expectation based on the popular chat apps is that when I create a conversation between userA and userB is that userA will have in its chat list a chat which displays userB so he knows that the conversation is with userB and userB will see in its list the same conversation named as userA.

I’m creating a conversational channel with the SDK:

but the createChannel method expects a channel name… so I’m not sure what to pass here to achieve what I described above.

Can you please advise?

Thanks

Hello @lorandd ,The solution for this would be to handle it on the frontend by detecting all users and displaying them with names that are not the channel’s creator’s name.

would have been very nice if for a 1:1 conversation channel this would have been handle by UIKit by default…

Hello @lorandd , Thank you for your feedback, and we will submit it for future enhancements. :pray:

actually I started investigating more and I see:

there seems to be some isDirectChat flag which has an effect on what is displayed for the chat name, where can I find more details about these things as the documentation doesn’t mention anything about it (or I didn’t find it)

@lorandd Let me check wit my team and i’ll back to you.

Hello @lorandd , After reviewing with our team the function you inquired about, we found that it is currently under development and not yet available in our UIKit. We will consider your concern as a suggestion for Product Enhancement to continue improving our product. Thank you.

:slight_smile:

Actually this works if I pass isDirectChat: true and the two userIds as metadata for the createChannel method, but it is not documented anywhere…

export async function createChannel(displayName, userIds, metadata = {}) {
  const newChannel = {
    displayName: displayName,
    tags: ["tag"],
    type: "conversation" as Amity.ChannelType,
    userIds: userIds,
    metadata: { isDirectChat: true, userIds: userIds, ...metadata },
  };

  const { data: channel } = await ChannelRepository.createChannel(newChannel);
  return channel;
}
1 Like

Thank you for the update, @lorandd. We appreciate your input, and we will promptly inform our team about this matter.