[keyserver/lib] Introduce a new message type and spec for toggling pins
Summary:
Part of the way we want to alert clients that a message has been pinned / unpinned is by introducing a new message type and message spec to represent toggling a pin. I've decided to consolidate the two actions into one spec and handle the robotext / notif texts that are sent within the functions to avoid lots of duplicate code (much like update-relationship-message-spec.js). We could probably indicate a message preview like 'you pinned "This is a message to b..."', but if we want to do that I'd prefer to handle that in a later diff once the core keyserver implementation is done.
Depends on D7112
Linear: https://linear.app/comm/issue/ENG-3190/introduce-a-new-message-type-and-spec-for-toggling-pins
Test Plan:
- Confirmed that hasMinCodeVersion successfully works for both cases where the client should be able to see the new message type and vice versa.
- Ran several pin / unpin actions on a variety of messages (text, images, videos) to confirm that the robotext is as expected
Sorry for the table view, I figured it'll make it easier to see specific images
Reviewers: atul, ginsu, tomek, ashoat, kuba
Reviewed By: ashoat
Subscribers: kuba, bartek, ashoat
Differential Revision: https://phab.comm.dev/D7148