Skip to content

Feat/anonymous replies fix clean#38

Closed
JoshuaNam wants to merge 4 commits intoCMU-313:mainfrom
JoshuaNam:feat/anonymous-replies-fix-clean
Closed

Feat/anonymous replies fix clean#38
JoshuaNam wants to merge 4 commits intoCMU-313:mainfrom
JoshuaNam:feat/anonymous-replies-fix-clean

Conversation

@JoshuaNam
Copy link

Changes (Issue #29 + #6)

  • Added backend support for marking replies/posts as anonymous
  • Persisted anonymous flag (0/1) on posts in the database
  • Masked poster identity for non-admin users (uid set to 0, username/display name set to "Anonymous", generic avatar)
  • Preserved real author visibility for admins and exposed isAnonymous=true flag
  • Ensured non-anonymous posts are unaffected
  • Added unit tests covering storage, API masking, admin visibility, topic-level masking, and regression cases

Testing

  1. Run the full backend test suite:
    npm test

  2. Verify:

  • Anonymous posts store anonymous=1
  • Regular users see masked identity (uid=0, username "Anonymous")
  • Admins see real author with isAnonymous=true
  • Non-anonymous posts behave normally
  1. Confirm all existing tests pass with no regressions

Related Issues

Resolves #6
Resolves #29

@JoshuaNam JoshuaNam closed this Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Anonymous Replies Store anonymous flag in database

1 participant

Comments