This is the directional inverse of Manage Blocked Users. “Blocked users” are accounts the current user blocked; “blocking users” are accounts that blocked the current user.
| API | Best for | Returns |
|---|---|---|
getBlockingUsers() | A live, self-updating list | Live collection of Amity.User |
getAllBlockingUsers() | A one-shot list for local decisions | Amity.User[] |
The blocking-user APIs are available on TypeScript, iOS, and Android. They are not available in the current Flutter SDK.
Get Blocking Users
Observe the users who have blocked the current user as a live collection. UnlikegetBlockedUsers(), this observer takes only a callback — there are no query parameters. Page through results with the onNextPage / hasNextPage values from the callback.
Get All Blocking Users
UsegetAllBlockingUsers() when your app needs a one-shot list instead of a live collection — for example, to filter content or hide interactions locally. It returns up to 100 users and uses a short SDK-side cache. Call it again when you need a fresh snapshot.
Hide Blocked Users from Feeds
Turn onexcludeBlockUserPosts in a post query to drop any post authored by or mentioning a user in either block direction — people the current user blocked, and people who blocked them. Mentions are included because a blocked user can appear in a post only as a tagged participant. The SDK applies the filter on-device after fetching and re-applies it automatically whenever the block list changes.
Hide Blocked Users from Comments
excludeBlockUserComments does the same for comment threads: comments authored by a user in either block direction are dropped before you see them. Because each device filters against its own block list, a user’s comments disappear for the people who blocked them — and vice versa — with no coordination needed.
The same short-page behavior applies — filtered comment pages can also come back shorter than the requested page size.
Keep Block State Live
Block and unblock events arrive in real time by default through the managedBLOCK auto-subscription. Every block-aware surface — getBlockingUsers(), getBlockedUsers(), and any feed or comment query using the exclude flags above — refreshes on its own when someone blocks or unblocks the current user. No polling, no manual reload.
You only need to touch this if you want to turn it off — for example, to manage a tight budget of real-time subscriptions. A missed event never breaks anything: the next fetch reconciles with the server.
Recipe: Anonymize Blocked Users in a Reaction List
Reactions are out of scope for the automatic block filters. To keep everyone in a reaction list but show people in a block relationship as “Anonymous”, combine both block lists client-side and relabel matching reactors. (To hide them instead, filter those reactions out rather than relabeling.)This is a client-side pattern, not an SDK feature — it is built from
getAllBlockedUsers() + getAllBlockingUsers() plus your existing reaction query.Related Topics
Manage Blocked Users
Query accounts the current user blocked.
Block & Unblock User
Change blocked status.
User Relationship
Follow, unfollow, and blocking overview.