Blocking users in a chat app

Hi Adalo community,

I have been stuck on this for weeks now and feel hopeless (I am completely new to the app world so please bare with me) .

I am unable to figure out how to block users on my chat app. I have tried creating different relationships within the collection but it’s still not working.

Is there perhaps a step to step guide? I have contacted support but sadly they’ve said it’s out of their scope.

Thanks to all in advance!

1 Like

Many to many relationship ‘blockedBy’. So you’ll show users where current user blocked by does not contain logged in user.

1 Like

Thanks for your reply!

But how would I implement this when creating the collection? Would I add it in the user database or make it separately and link it?

Hello, can you put in the user base a true or false that is userblokeado… then you filter the chat that is only available for userblokeado= false … … how to block the user? You can add a button next to the chat… when you click, you open a page or modal that shows you the photos and users of the chat… next to each user, put a button that says block user… when you click, you will win an action that is update current user>userblocked>true.

You can play with these two options that we gave you… you can always reach the same goal by many different paths

It’s a many to many relationship between user and user. You set up the relationship in the user collection.

1 Like

Thank you to you both! I will try this now!

Mary,

  1. Go to USERS Collection
  2. Create two TRUE OR FALSE properties
    Property a - USERS I BLOCKED
    Property b - USERS THAT BLOCKED ME

You have successfully created the database you need for BLOCKING

The next part is to use this logic where ever it applies.

If it’s a LIST of CHATS OR WHATEVER,
Apply the logic.

For instance, if a list of chats, you label the List and say, LIST OF CHATS, then use a custom list to say…EXCEPT USERS THAT I BLOCKED AND/OR USERS THAT BLOCKED ME!

Try this and send feedback.

THANK YOU so much!!

I have input the first aspect when creating properties, however is there a way I could create this in the chat via a block icon? So in the chat I have placed a block button and I would want the user to click that and the user they are speaking with is automatically blocked?

Thanks for your help!

Hi @Mary5 ,

If you didn’t find solution for this, try search for Group Chat Template in this forum, there are examples of doing that.

Yea on clicking block button,
Link it to a modal screen if you like (Are you sure you want to block “Username”?)

If no, link back with cancel button.
If yes, link an action logic to ADD TO “USERS THAT I BLOCKED”

Then Use visibility rule to display what happens if "The user you were chatting with is ADDED TO “USERS THAT I BLOCKED”

Thank you so much @Yongki! I have started to look through this.

@endieumunna thank you! I will try this. How would I put together the visibility rule especially in the Home Screen. That is the aspect I am finding difficult. When I go back onto the screen I can still see the user and can message them. Thanks!!

1 Like

Hi all,

I have managed to get together a list of blocked users sorted on the data base but blocked users are still showing on the Home Screen and Start a conversation screen. I have tried filtering… so user>blocked by>does not contain>logged in user.

Am I on the right track?

1 Like

Can someone please respond to me? It would be greatly appreciated. Or perhaps steer me in the direction of an app expert who I can perhaps pay an hourly fee to help me resolve.

Then do a visibility rule on your home screen…will be visible if USERS THAT I BLOCKED OR USERS THAT BLOCKED ME does not contain this “Username”

Can you send a link of what you’re building?

@Mary5, maybe this app will help you!

Can you clone your app and share it? I’ll take a look

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