HomePhabricator
Diffusion Comm 1822281a8e27

[native] introduce onPressReact to reaction message utils

Description

[native] introduce onPressReact to reaction message utils

Summary:
introduce onPressReact function to new file called reaction-message-utils. Some things to note about this method, for now, I am hardcoding the like emoji since at this current state we only support liking a message. I am thinking that this will change in subsequent diffs when I introduce "unliking" and different reactions. Also, since we are not doing retry behavior for reactions (at least for now) I figured the best way to handle an error for the user would be to show an alert saying that the reaction couldn't be sent. This is something we also do in message report utils


Depends on D5770 and D5769

Linear Task:
ENG-2246

Test Plan:
This will be tested further in subsequent diffs. Ran this locally on native and nothing crashed. Also helped me get to the point where I could push a reaction message into the DB (see screenshot below)

Screenshot 2022-11-28 at 7.16.55 PM.png (2×3 px, 1 MB)

Reviewers: atul, rohan, tomek

Reviewed By: atul, tomek

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D5780

Details

Provenance
ginsuAuthored on Nov 30 2022, 12:11 PM
Reviewer
atul
Differential Revision
D5780: [native] introduce onPressReact to reaction message utils
Parents
rCOMMc975c0b5d7b1: [lib] introduce sendReactionMessage to message actions
Branches
Unknown
Tags
Unknown