HomePhabricator
Diffusion Comm 552d15a09663

[native] introduced useCanCreateReactionFromMessage function to reaction…

Description

[native] introduced useCanCreateReactionFromMessage function to reaction message utils

Summary:
introduced useCanCreateReactionFromMessage function to reaction message utils. useCanCreateReactionFromMessage does several checks if the user can send a reaction message and depending on the result of those checks will display the react option to the message tooltip. The function checks if the message has been realized (only realized messages have an id), it also checks if the reaction message creator is currently is not blocked by the other target message creator, and it also checks if the reaction message creator has permission to voice in the thread


Depends on D5780
Linear Task: ENG-2246

Test Plan:
Please watch the demo videos to see the changes i made (in the middle of the demo, there is some hangtime where I am waiting for simulator to reconnect, feel free to fast forward through that part):

Demos to show scenario where a blocked/blocker pair of users is in a group chat:

Dan's (blocker) POV:

Ryan's (blocked) POV:

Reviewers: atul, tomek, rohan, ashoat

Reviewed By: atul, tomek, rohan, ashoat

Subscribers: ashoat, tomek, atul

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

Details