User Reporting And Blocking
Quick Answer
The user reporting module lives in src/core/user-reporting. It lets users block or report other users and gives chat, feed, profile, video chat, and social graph features a shared way to filter blocked users.
Apps with user-generated content should keep this module enabled and production-tested before store submission.
Source Map
src/core/user-reporting
├── api
├── firebase.ts
├── index.ts
└── redux
Important exports:
| Export | Purpose |
|---|---|
useUserReporting | Reads blocked/reported user state. |
useUserReportingMutations | Blocks, reports, or unblocks a user. |
markAbuse | Legacy compatibility function for creating a report. |
unblockUser | Legacy compatibility function for unblocking. |
Firebase Data And Functions
The Firebase implementation uses collections and callable Functions similar to:
reports
user_reports/{userID}/reports_live
fetchBlockedUsers
markAbuse
unblockUser
Deploy the matching Firebase Functions before testing production blocking/reporting. Firestore rules should prevent users from reading or writing other users' moderation data directly unless the app intentionally exposes that data through safe, scoped paths.
Where It Is Used
User reporting is usually connected to:
- chat and group chat;
- video/audio calls;
- social feed posts;
- stories;
- comments;
- profile screens;
- user search and friend lists;
- marketplace/listing messages when users interact with each other.
When a user is blocked, related features should stop showing content and should prevent new direct interactions where appropriate.
Store Review Readiness
Before release, verify that user-generated content flows include:
- a visible report or block action;
- a way to unblock users if the app supports blocking;
- backend records for moderation review;
- filtering in feed/chat/user lists;
- clear Terms of Use and privacy policy links;
- a support contact path for abuse reports;
- admin or operational process for reviewing serious reports.
Custom Backend
To use your own backend:
- Implement the same hook behavior in
src/core/user-reporting/api/backend. - Route report/block actions through authenticated endpoints.
- Store moderation events server-side.
- Return blocked users to the app so feed, chat, and profile screens can filter them.
- Add rate limiting and abuse prevention to report endpoints.
- Keep audit data for moderation operations.
Verification Checklist
Test:
- user A reports user B;
- user A blocks user B;
- user B disappears from chat/feed/search where expected;
- user A can unblock user B if that flow exists;
- self-reporting or self-blocking is prevented;
- permission-denied errors do not leave infinite loading;
- moderation records are visible to your admin/support process.
Troubleshooting
| Problem | Fix |
|---|---|
| Block button appears to do nothing | Confirm Firebase Functions are deployed and callable by the signed-in user. |
| Blocked users still appear in chat/feed | Check that the consuming module subscribes to blocked users and filters results. |
| Blocked users screen loads forever | Return an empty list on listener error and inspect Firestore rules. |
| Users can modify report records directly | Tighten Firestore rules and move writes through callable Functions. |
| Store review asks for UGC moderation | Show block/report UI, Terms of Use, support contact, and moderation process. |