Block and mute people

Open
#123 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
28/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Domain
full-stack

Research direction

Start in apps/api/src/controllers/postController.ts to see how feed queries are built, since every read path (explore, search, notifications) needs the same author filter; then read apps/api/src/controllers/messageController.ts for the follow/comment/like/message rejection points. The Block model with kind mute/block and a unique pair index is new, so mirror an existing small model for structure. Finish in apps/web/src/pages/SettingsPage.tsx for the undo list, and done means tests per blocked action plus npm test and npm run typecheck passing.

Written by the indexing model from the issue text.

Description

api enhancement help wanted web

Difficulty: Advanced · Estimated size: 3 to 4 days

Context

There is a report button and admin bans, but a person cannot protect themselves from someone who bothers them.

Problem or goal

Let people mute (hide that person's posts from my feeds) and block (they cannot follow, message or comment on me, and I do not see them).

Suggested approach

  • API: a Block model with a kind of mute or block, unique per pair.
  • Filter feeds, explore, search and notifications for muted and blocked authors.
  • Reject follow, comment, like and message attempts from a blocked person with a neutral error.
  • Web: menu items on a profile and a post, and a list in Settings to undo.

Where to look

  • apps/api/src/controllers/postController.ts (feed queries)
  • apps/api/src/controllers/messageController.ts
  • apps/web/src/pages/SettingsPage.tsx

Acceptance criteria

  • Feeds exclude muted and blocked authors.
  • A blocked person cannot tell they are blocked from the error text.
  • Admins and moderation still work normally.
  • Tests cover each blocked action.

Out of scope

Muting words, and blocking whole communities.

How to work on it

  1. Comment here to claim it, so two people do not do the same work.
  2. Fork the repo and branch from main (feat/short-name or fix/short-name). Setup steps are in docs/DEVELOPMENT.md.
  3. Keep the change focused and add tests for backend logic.
  4. Run npm run typecheck, npm test and npm run lint and npm run format before opening the pull request.
  5. Use a Conventional Commits title (for example feat(web): add bookmarks). More in CONTRIBUTING.md.

Stuck? Ask in this issue. Questions are welcome.


Generated by Claude Code

Dominant language
TypeScript
Stars
6
Forks
6
Avg merge
1h 59m
Merged PRs (30d)
59

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Haseeb-MernStack/commune

All issues in Haseeb-MernStack/commune

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.