[lib] introduced reaction message spec boilerplate
Summary:
For this reaction message spec boilerplate, I implemented all of the required methods that a message spec requires. This includes the following functions: messageTitle, rawMessageInfoFromClientDB, createMessageInfo and generatesNotifs. I also added messageContentForClientDB because this goes hand in hand with rawMessageInfoFromClientDB.
For rawMessageInfoFromClientDB, I return the targetMessageID and the reaction and these will be in the content of rawMessageInfoFromClientDB.
For messageTitle I validate the message info and then call and return the results of messagePreviewText which was modified in D5689
For rawMessageInfoFromClientDB I am returning an object of all the necessary info I get from clientDBMessageInfo. This includes getting targetMessageID and reaction which I get from content.
For createMessageInfo I am grabbing the necessary information from rawMessageInfo and creator and returning a ReactionMessageInfo object
As I continue to build out this reaction message spec and implement the other parts of message liking, I might be making some changes to these four functions especially as my understanding improves
Will be adding the other necessary functions for this message spec in subsequent diffs
Depends on D5689
Linear Task: ENG-2245
Test Plan: Ran web and mobile app locally and nothing crashes/will be doing more tests on this message spec in subsequent diffs
Reviewers: atul, rohan, tomek
Reviewed By: atul, tomek
Subscribers: ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D5690