Page MenuHomePhabricator

[lib] introduced action field to reaction type
ClosedPublic

Authored by ginsu on Dec 2 2022, 11:26 AM.
Tags
None
Referenced Files
F3564503: D5801.diff
Fri, Dec 27, 2:11 PM
F3552380: D5801.diff
Thu, Dec 26, 8:07 PM
Unknown Object (File)
Sun, Dec 15, 6:23 AM
Unknown Object (File)
Sun, Dec 15, 6:23 AM
Unknown Object (File)
Sun, Dec 15, 6:23 AM
Unknown Object (File)
Sun, Dec 15, 6:22 AM
Unknown Object (File)
Sun, Dec 15, 6:19 AM
Unknown Object (File)
Sat, Dec 7, 1:59 PM
Subscribers

Details

Summary

introduced action field to the reaction type. action is an enum that describes whether the reaction in the reaction field is being added or removed with the values add_reaction and remove_reaction from the target message. I believe this should address the concerns from yesterday's discussion about designing reactions in a more flexible way that allows us to enable multiple reactions (like slack/discord) in the future.


Linear Task: ENG-2244

Test Plan

flow, and nothing crashes locally on native/web. also tested adding this field with the exisiting message liking infrastructure in my local stack and was able to get unsettingReaction to appear in the DB.

Screenshot 2022-12-05 at 4.21.35 PM.png (1×3 px, 1 MB)

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ginsu requested review of this revision.Dec 2 2022, 11:38 AM
atul requested changes to this revision.Dec 5 2022, 10:37 AM

Instead of a boolean called unsettingReaction where a value of false means we're setting a reaction... it'd be clearer to create a field like action that's an enum (eg 'add_reaction' | 'remove_reaction')

This revision now requires changes to proceed.Dec 5 2022, 10:37 AM

addressed atul's comments

ginsu retitled this revision from [lib] introduced unsettingReaction field to reaction type to [lib] introduced action field to reaction type.Dec 5 2022, 1:24 PM
ginsu edited the summary of this revision. (Show Details)
ginsu edited the test plan for this revision. (Show Details)

Thanks for addressing this feedback! (apologize for all the rebasing...)

This revision is now accepted and ready to land.Dec 6 2022, 5:59 PM