cinny icon indicating copy to clipboard operation
cinny copied to clipboard

Do not display duplicate reactions

Open TTTaevas opened this issue 1 year ago • 2 comments

Description

"Duplicate reactions" in this context means reactions using the same key from the same user

As there are two places in the code from where reactions can be gotten (Reactions.tsx & ReactionViewer.tsx), the code to fix the problem also appears twice This code ignores (disables for a line) the no-param-reassign ESLint rule, as I couldn't find a way to return something of type [string, Set<MatrixEvent>] without returning the parameter itself

I must admit I don't really know if that's the right way to go about it

Fixes #1653

Type of change

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings

TTTaevas avatar Apr 28 '24 18:04 TTTaevas

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

github-actions[bot] avatar Apr 28 '24 18:04 github-actions[bot]

I have read the CLA Document and I hereby sign the CLA

TTTaevas avatar Apr 28 '24 18:04 TTTaevas