Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Reactions set/unset #32994

Merged
merged 27 commits into from
Sep 19, 2024
Merged

refactor: Reactions set/unset #32994

merged 27 commits into from
Sep 19, 2024

Conversation

KevLehman
Copy link
Contributor

@KevLehman KevLehman commented Aug 6, 2024

Proposed changes (including videos or screenshots)

  • Refactors chat.react endpoint to remove check for message (executeSetReaction already does it)
  • Refactors executeSetReaction to perform emoji & reactions check before all DB calls
  • Refactors executeSetReaction to use new countByNameOrAlias query instead of a find().count()
  • Refactors executeSetReaction to only request the required data when requesting room from DB
  • Refactor setReaction to not await for callbacks (we don't need the return value anyways)
  • Refactor setReaction to notify of room changed at the end of the function (instead of next to every update). This doesn't gain any perf, but looks better (and also fixes a missing notify).
  • Added unit tests for all functions (except the meteor.methods call...)

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-597

Steps to test or reproduce

Further comments

Copy link
Contributor

dionisio-bot bot commented Aug 6, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Aug 6, 2024

⚠️ No Changeset found

Latest commit: 1accdaf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Aug 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.93%. Comparing base (6a3c25c) to head (9a2fc13).
Report is 5 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32994      +/-   ##
===========================================
+ Coverage    59.85%   59.93%   +0.08%     
===========================================
  Files         2554     2556       +2     
  Lines        63008    63400     +392     
  Branches     14129    14246     +117     
===========================================
+ Hits         37711    37998     +287     
- Misses       22890    22969      +79     
- Partials      2407     2433      +26     
Flag Coverage Δ
unit 77.20% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@KevLehman KevLehman marked this pull request as ready for review August 6, 2024 21:25
@KevLehman KevLehman requested review from a team as code owners August 6, 2024 21:26
@KevLehman KevLehman added this to the 6.12 milestone Aug 7, 2024
@KevLehman KevLehman changed the title refactor: setReaction and executeSetReaction functions refactor: Reactions set/unset Aug 7, 2024
@KevLehman KevLehman added stat: QA assured Means it has been tested and approved by a company insider and removed stat: QA assured Means it has been tested and approved by a company insider labels Aug 16, 2024
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider and removed stat: ready to merge PR tested and approved waiting for merge stat: QA assured Means it has been tested and approved by a company insider labels Aug 16, 2024
@kodiakhq kodiakhq bot removed the stat: ready to merge PR tested and approved waiting for merge label Sep 16, 2024
Copy link
Contributor

kodiakhq bot commented Sep 16, 2024

This PR currently has a merge conflict. Please resolve this and then re-add the ['stat: ready to merge', 'automerge'] label.

Copy link
Contributor

github-actions bot commented Sep 17, 2024

PR Preview Action v1.4.8
Preview removed because the pull request was closed.
2024-09-19 23:58 UTC

@KevLehman KevLehman marked this pull request as ready for review September 18, 2024 18:05
@KevLehman KevLehman added the stat: ready to merge PR tested and approved waiting for merge label Sep 18, 2024
apps/meteor/app/reactions/server/setReaction.ts Outdated Show resolved Hide resolved
@sampaiodiego sampaiodiego merged commit 7faba77 into develop Sep 19, 2024
8 of 29 checks passed
@sampaiodiego sampaiodiego deleted the refactor/set-reactions branch September 19, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants