[FIX] Duplicate User Reactions
Proposed changes (including videos or screenshots)
https://user-images.githubusercontent.com/55396651/104439142-ca37de80-55b6-11eb-980b-71e18c1c74da.mp4
Previously, if a user renamed himself and reacted again to the message, then his username would be added to the reaction again. This scenario has been fixed by considering the userIds array also into the reactions object.
https://user-images.githubusercontent.com/55396651/104439179-d6bc3700-55b6-11eb-8488-a8fdd33b9655.mp4
Also, when hovered over the reactions, You will be shown if the userId matches (and not the username).
Corner case situation ( where user2 has renamed himself to user1 and reacts to the message. Mentioned in detail in #20175 ) is also handled by creating a new array of usernames if the user's username is already there in the reactions object.
Issue(s)
Closes #6985 Closes #20175
Steps to test or reproduce
Further comments
I have also added a migration file (v213) for adding userIds array into the reactions object.
@dougfabris Please review :D
Should I update the migration file? (From v214 to v219)
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: aditya-mitra
:x: Douglas Fabris
Douglas Fabris seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.
hey @aditya-mitra this looks like a great fix but could you figure out why the checks failed. Please let me know