[keyserver/lib] Add a fetchPinnedMessages method to retrieve all pinned messages for a thread
Summary:
For any given thread, we need to allow participants to view the pinned messages. The query checks for messages where m.pinned = 1 and translates the rows into messageInfos using an existing function. I use shimUnsupportedRawMessageInfos to prevent problems if there is a pinned message of a newer message type that an older client does not yet support.
Depends on D6930
Test Plan:
Set three messages in the messages table to be 'pinned' and call this query and log the results. Confirm the results are as expected.
Reviewers: atul, ginsu, tomek, ashoat
Reviewed By: ashoat
Subscribers: ashoat
Differential Revision: https://phab.comm.dev/D7110