# Filter posts by blocked users

**URL:** <https://forum.adalo.com/t/filter-posts-by-blocked-users/12087>\
**Category:** Get Help\
**Created:** [May 1, 2021, 5:45am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087 "2021-05-01T05:45:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![erveen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erveen/32/8011_2.png) [@erveen](https://forum.adalo.com/u/erveen)\
**Post date:** [May 1, 2021, 5:45am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/1 "2021-05-01T05:45:13Z")

</div>

Hi!  
In my social networking app, I need a way for users to block other users & their posts (in a list of all posts).

I’ve seen several topics on following Appstore rules for User Generated Content, e.g., filtering the list of users to exclude blocked users. Tried a similar approach but to no avail.

How can I do that? Sure seems like a simple one 🙂

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [May 2, 2021, 3:26pm UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/2 "2021-05-02T15:26:09Z")

</div>

So you need a couple of relationships between users.

For example ‘myblocklist’ relationship and ‘blockedby’

Filter the list something like this:  
Post \> Post creator \> MyBlockList \> does not include \> logged in user.  
Post \> Post creator \> BlockedBy \> does not include \> logged in user

That covers both sides of the blocking equation

---

<div class="post-metadata">

**Author:** ![erveen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erveen/32/8011_2.png) [@erveen](https://forum.adalo.com/u/erveen)\
**Post date:** [May 3, 2021, 8:45am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/3 "2021-05-03T08:45:58Z")

</div>

I thought along those lines, but am having trouble executing

This is what I get when trying to add the filter such as:  
_Current Post \> Posting user \> BlockedBy \> does not include \> logged in user_

 ![Снимок экрана 2021-05-03 в 15.41.58](https://us1.discourse-cdn.com/flex020/uploads/adalo/original/2X/c/c0f911c019d21aa45dfcd198e1a074cb3f74a676.png)  
There’s no “BlockedBy \> All” list, so I cannot choose “does not include \> logged in user”

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [May 3, 2021, 11:13am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/4 "2021-05-03T11:13:05Z")

</div>

I think you need to set these up as many-to-many relationships.

---

<div class="post-metadata">

**Author:** ![erveen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erveen/32/8011_2.png) [@erveen](https://forum.adalo.com/u/erveen)\
**Post date:** [May 3, 2021, 11:34am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/5 "2021-05-03T11:34:35Z")

</div>

Tried that. It does work in terms of filtering.

However, blocking becomes mutual - if User1 blocks User2, then User1 is automatically becomes blocked by User2.

---

<div class="post-metadata">

**Author:** ![erveen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erveen/32/8011_2.png) [@erveen](https://forum.adalo.com/u/erveen)\
**Post date:** [May 3, 2021, 11:36am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/6 "2021-05-03T11:36:28Z")

</div>

Thanks a lot for your responses!

Surprised though that it’s not some ready-made feature - AppStore requires EVERY app with user-generated content to have that functionality.

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [May 3, 2021, 11:39am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/7 "2021-05-03T11:39:56Z")

</div>

It’s a bit of a fiddle. As app makers, we do need to distinguish between who is the blocked user and who is the blocker though, as people’s functionality will vary.

---

<div class="post-metadata">

**Author:** ![erveen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erveen/32/8011_2.png) [@erveen](https://forum.adalo.com/u/erveen)\
**Post date:** [May 4, 2021, 3:48am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/8 "2021-05-04T03:48:04Z")

</div>

I see. What do you suggest then?

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [May 4, 2021, 4:18am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/9 "2021-05-04T04:18:51Z")

</div>

I do it exactly as I described here, I don’t know a shortcut at the moment, but I’d also be interested to hear if other makers have found a better solution.

---

<div class="post-metadata">

**Author:** ![erveen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erveen/32/8011_2.png) [@erveen](https://forum.adalo.com/u/erveen)\
**Post date:** [May 4, 2021, 4:47am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/10 "2021-05-04T04:47:28Z")

</div>

You mean to leave it as mutual blocking? Maybe you’re right it’s better than nothing…

---

<div class="post-metadata">

**Author:** ![theadaloguy](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/theadaloguy/32/8023_2.png) [@theadaloguy](https://forum.adalo.com/u/theadaloguy)\
**Post date:** [May 4, 2021, 4:50am UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/11 "2021-05-04T04:50:54Z")

</div>

It isn’t quite mutual blocking, it’s more that if you block someone, you shouldn’t be able to see their stuff either (that seems a bit unfair for the users).

That’s why I implement both relationships, because in my apps I don’t want users to block someone yet still be able to see all of their stuff.

---

<div class="post-metadata">

**Author:** ![erveen](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.adalo.com/erveen/32/8011_2.png) [@erveen](https://forum.adalo.com/u/erveen)\
**Post date:** [May 4, 2021, 2:13pm UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/12 "2021-05-04T14:13:32Z")

</div>

not sure I got what you mean(

that’s what happens as I see it:

- say BlockedBy is an m2m relationship
- User1 blocks User2 \> User1 is in User2’s BlockedBy list
- User1 won’t see User2’s posts, because the filter is “Current Post \> Posting User (User2) \> BolckedBy \> does not include \> logged in user”
- because it’s an m2m, User2 is also in User1’s BlockedBy list
- User2 won’t see User1’s posts

…and I don’t want it to happen - I want User2 to see User1’s posts!

> theadaloguy, |
> 
> - |

thanx a lot for your help!

---

<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:** [May 14, 2021, 2:14pm UTC](https://forum.adalo.com/t/filter-posts-by-blocked-users/12087/13 "2021-05-14T14:14:31Z")

</div>

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