Automatically Add Member to Chat

Hi and hoping to get some help or advice on best way to achieve the following outcome:

I’ve built a complex chat app which is working great! It allows for users to be matched based on user chosen parameters.

Next, I want to add a “moderator” to each chat meaning a third user is essentially being added to the chat member count.

Two questions I am trying to answer:

  1. Collections/Database: is it best to have a separate Moderator collection that holds moderator profile info (name, profile image, etc) OR do I create the moderator on the User collection and have a User Type field that identifies which users are moderators?
  2. How can I automatically add a moderator at the point when the conversation is being created? I’ve used Adalo’s standard chat template so I still use collections with relationships to users like Conversations, Messages, Read Status, etc. I’ve posted a few screen shots of the actions to start the chat when a user initiates. But I cannot figure a way to automatically add the 3rd member of the chat – the moderator.

Hope this makes sense.



Hi @dk24,

Welcome to the community :partying_face:

Is it one Moderator or multiple?

Thank you

Thanks for the reply.

There would be multiple moderators. As the volume of chats increase, the moderators will increase.

I’m open to solving with just one at this MVP level if it’s simpler. But would need to scale that over time.

Got it! Now how you want to add these moderates? Add all or add a random one or a selected one?

One moderator per chat. Random is fine.

Ok :+1: One more question is that these moderators are also like users who signup and chat with others or added by you into the collection?

These are internal users set up by an admin. Not external going through normal signup workflows. Hope that answers.

Check this and let me know!

Wow. Okay @dilon_perera . Thank you. I think it totally makes sense.

What I cannot ascertain from the video is if the moderator is active on the conversation and can see/monitor and send messages with the current chat?

I only see 2 members of the chat still which indicates you’re not adding a moderator member to a conversation.

I figured out how to add the moderator to the conversation membership by adding another “update conversation” action and adding the new current user. Although I’m unsure why there are 2 current users now and if there is a way to differentiate for the future.

I think I’m off to a good start here. Thanks @dilon_perera

1 Like

If you add another list that for moderators and make the filter for Logged in user’s > Conversations(Moderator) then the chats that relevant moderator is available will show that relevant conversation(s) to that moderator. You can add this to the members property too and then no need another list. I didn’t added it because I thought you need to see the moderator in another property.

But anyway happy that you solved it like what you needed! ( adding the moderator to the members property )

It’s because the Random Picker and the current list both connected the same users collection and pass current user data. You need to test this a bit by adding one by one to get the correct result. But here you don’t need to do that because you need both to be there and make sure you put both :+1: ( 1st one and 2nd one )

Awesome and Your Welcome! Good Luck!

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