RocketChat / RocketChat/Rocket.Chat

[BUG] Renamed User can Change former User's reaction

Open
#20,175 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

triaged
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

This is a very corner case situation.

I will try to explain it as simply as possible.

Consider a user (say A) has recently changed his username and another user (say B) now takes his username.
A had reacted to some messages where B had not. Now, B reacts to those messages (after renaming himself). He finds that the reactions are being removed (of both A and B ).

https://user-images.githubusercontent.com/55396651/104361372-5eaf2c00-5538-11eb-8cf4-9b01f136d2fd.mp4

Steps to reproduce:
  1. User1 logs in and posts "rocket chat is cool" in a chanel
  2. User1 reacts to his message with a happy face emoji
  3. User1 changes his name to User1Chg
  4. User2 logs in and changes his name to User1
  5. User2 (now renamed as User1) reacts to the "rocket chat is cool" message
  6. User2 finds that his reaction is removed (instead of being added)
Expected behavior:
Actual behavior:
Server Setup Information:
  • Version of Rocket.Chat Server: 3.11.0-develop
  • Operating System: Ubuntu
  • Deployment Method:
  • Number of Running Instances:
  • DB Replicaset Oplog:
  • NodeJS Version: 12.20.1
  • MongoDB Version: 4.2.8
Client Setup Information
  • Desktop App or Browser Version: Chromium
  • Operating System: Ubuntu
Additional context
Relevant logs:

Contributor guide

Open the 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.

Research direction

Start by reproducing the username-renaming and reaction sequence described in the issue, then trace the reaction handling involved when User2 reuses User1's former name. Done means User2's reaction is added without removing either user's existing reaction.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.