Discussion reply notifications show the real name of an anonymous replier

Open Beginner friendly
#2,403 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Start in discussion-student.component.ts at sendPostToStudentsInThread lines 259-266, where the notification text is built from getUsernamesByWorkgroupId. Find the component's anonymization flag and compare how the discussion view chooses the anonymous name, then make the notification omit the replier's name when anonymized. Done means an anonymized thread notification reads generically while non-anonymized notifications still name the replier.

Written by the indexing model from the issue text.

Description

With "Anonymize responses" enabled, a student who replies in a thread is shown under an anonymous name in the discussion, but the notification sent to the thread's other participants names them.

How to reproduce

  1. Author a Discussion with "Anonymize responses" enabled.
  2. Student A posts; student B replies to A's post.
  3. As student A, open the notifications menu.

The notification reads "<B's real name> replied to a discussion you were in!".

Cause

DiscussionStudentComponent.sendPostToStudentsInThread (discussion-student.component.ts lines 259 to 266) builds the message from getUsernamesByWorkgroupId without checking whether the component is anonymized. The real name is also stored in the notification's message on the server.

Possible fix

When the component is anonymized, leave the name out ("Someone replied to a discussion you were in!") or use the anonymous name. Leaving it out avoids depending on the anonymous name being the same for every viewer, which it currently is not (#2393).

Dominant language
TypeScript
Stars
4
Forks
8
Avg merge
3d 8h
Merged PRs (30d)
12

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

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 WISE-Community/WISE-Client

All issues in WISE-Community/WISE-Client

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.