Chat template creating duplicate conversations instead of linking to existing conversation

Hi,

Ive been trying to figure this out for a while following what other people have previously put on here about a similar issue.
When you go to the new chat screen which has a list of users on it, and then click on a user whom you already have a conversation with it creates a new conversation instead of linking to the existing conversation.

I have tries adding conditions to the actions when clicking the user but it still creates a new conversation. The condition i added for the create conversation and 2x update conversation to add the users to the conversation was:

This action will ooccur if - current users > conversations > members

does not contain

logged in user.

I am not sure whether this is wrong or whether i would be better of trying to create my own chat system from scratch (which I already have done and come across the same issue)

Any tips or ideas would be greatly appreciated.

Thanks :smile:

Hi @Kazik,

Yes, it’s true that the template makes conversations duplicate because when there’s an already conversation made, linking to that conversation is not built in that template. So you need to build that part. (you may find some posts here where few other makers discussed about this)

If you want to go with the current design that is already built, then you need to have a loading screen to process the actions because even though you make the create conversation & update conversation actions conditional, it won’t work as current conversation data is not available so app doesn’t know which conversation data to pass it over to the chat screen. With a loading screen, it would look like this. : https://drive.google.com/file/d/1cx8H-XMomWzI2T0CGhZjI5KHWR7O-ubf/view?usp=share_link

If you like to customize, then you can add two buttons into the list to create the chat and open the existing chat. Same thing like Patrick teaches in this course. : Build an Instagram Clone with Adalo, a No-Code App Builder (Check the 14th chapter - Messaging and ‘Creating Conversations and Preventing Duplicates’ video)

Let me know what you think!

Thank you and have a great day!

Hi Dilon,

The loading screen works very well, thank you so much for your reply and help.

One issue that I am now having with that though is that when I create a conversation with someone who I have not previously had a conversation with, it links me to the messaging but the name and profile picture dispplayed at the top is the logged in users not the current user even though the magic text is current user. Do you have any idea why this might be the case? Could it be that my collection is set up incorrectly or am I just missing something obvious.

Thanks again for that, has made my weekend haha.

1 Like

Hi Kazik,

Thanks for the update and you’re very welcome!

I’ve faced this kind of an issue recently with a different setup which solved by making the button a list and re-link the user data. Maybe in the creating conversation countdown, remove the link action (plus assign 0 seconds) and add it on the countdown inside the list (plus assign 1 or 2 seconds and make the list to auto refresh), or creating the conversation with a sometimes condition before entering the loading screen which the loading screen simply finds the conversation and directs the user to it. Or you would need to make the image and the text in the chat screen as a list but that would end up with too many lists in the chat screen. Would you be able to share your current setup with some screenshots or with a screen recording?

Let me know!

Thank you and have a great day!

Hi again,

Just changed the new chat countdown so that it does not link to the messaging screen. It works now with the conversations list auto updating and then linking the newly created conversation to the messaging screen.

Thank you so much,

Enjoy your day

Hi Dillon,

Will have a look at what you suggested now.

Have been trying to add screenshots and a screen recording but it says that I can’t have images or links in my posts.
Any ideas?

Hi @Kazik,

Apologies for the late reply!

So everything is running well or are there any issues still? There was an issue with the forum for not letting some makers to add media items but now that should be fixed.

Let me know how it goes!

Thank you and have a great day!

Yep everything all good, thanks for your help

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.