# Automatically Add Member to Chat

**URL:** <https://forum.adalo.com/t/automatically-add-member-to-chat/34966>\
**Category:** Get Help\
**Created:** [January 3, 2023, 7:41pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966 "2023-01-03T19:41:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![dk24](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dk24](https://forum.adalo.com/u/dk24)\
**Post date:** [January 3, 2023, 7:41pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/1 "2023-01-03T19:41:26Z")

</div>

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.

 ![2023-01-03 at 2.36 PM](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/b/9/b9c1fc088525a13173cc1825fce62b9bce07c686.jpeg)  
 ![moderator2](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/9/c/9cff6076bba949cad1743af1f6c2f735fb9c5a97.jpeg)  
 ![moderator3](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/3X/e/7/e7cf3b01e786f9d99db27019e6d1c9a534ccc360.jpeg)

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 5, 2023, 10:27pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/2 "2023-01-05T22:27:45Z")

</div>

Hi @dk24,

Welcome to the community 🥳

> [@dk24](#):
>
> 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?

Is it one Moderator or multiple?

Thank you

---

<div class="post-metadata">

**Author:** ![dk24](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dk24](https://forum.adalo.com/u/dk24)\
**Post date:** [January 6, 2023, 2:29pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/3 "2023-01-06T14:29:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 6, 2023, 4:37pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/4 "2023-01-06T16:37:50Z")

</div>

> [@dk24](#):
>
> There would be multiple moderators. As the volume of chats increase, the moderators will increase.

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

---

<div class="post-metadata">

**Author:** ![dk24](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dk24](https://forum.adalo.com/u/dk24)\
**Post date:** [January 6, 2023, 4:39pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/5 "2023-01-06T16:39:08Z")

</div>

One moderator per chat. Random is fine.

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 6, 2023, 4:58pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/6 "2023-01-06T16:58:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dk24](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dk24](https://forum.adalo.com/u/dk24)\
**Post date:** [January 6, 2023, 5:00pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/7 "2023-01-06T17:00:53Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 6, 2023, 6:04pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/9 "2023-01-06T18:04:54Z")

</div>

Check this and let me know!

> **[Chat Moderators.mp4](https://drive.google.com/file/d/1foubmzf2BIZSG4GAfUSNArFde4xLdUdL/view?usp=sharing)**
>
> Google Drive file.

> **[Chat Moderators](https://previewer.adalo.com/3df22be5-e0b8-487c-b7ad-902228fdb68a)**
>
> Built with Adalo

---

<div class="post-metadata">

**Author:** ![dk24](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dk24](https://forum.adalo.com/u/dk24)\
**Post date:** [January 6, 2023, 6:36pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/10 "2023-01-06T18:36:50Z")

</div>

Wow. Okay @Dilon . 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.

---

<div class="post-metadata">

**Author:** ![dk24](https://avatars.discourse-cdn.com/v4/letter/d/50afbb/32.png) [@dk24](https://forum.adalo.com/u/dk24)\
**Post date:** [January 6, 2023, 7:32pm UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/11 "2023-01-06T19:32:26Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Dilon](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/dilon/32/39815_2.png) [@Dilon](https://forum.adalo.com/u/Dilon)\
**Post date:** [January 7, 2023, 8:46am UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/12 "2023-01-07T08:46:20Z")

</div>

> [@dk24](#):
>
> 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?

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.

> [@dk24](#):
>
> I figured out how to add the moderator to the conversation membership by adding another “update conversation” action and adding the new current user.

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

> [@dk24](#):
>
> Although I’m unsure why there are 2 current users now and if there is a way to differentiate for the future.

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 👍 ( 1st one and 2nd one )

> [@dk24](#):
>
> I think I’m off to a good start here. Thanks @Dilon

Awesome and Your Welcome! Good Luck!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/system/32/40401_2.png) [@system](https://forum.adalo.com/u/system)\
**Post date:** [January 17, 2023, 8:46am UTC](https://forum.adalo.com/t/automatically-add-member-to-chat/34966/13 "2023-01-17T08:46:54Z")

</div>

Closed on January 17, 2023, 8:46am UTC

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