HomePhabricator
Diffusion Comm 31b49cdf0e97

[keyserver] Add a function to toggle the pin status of a message

Description

[keyserver] Add a function to toggle the pin status of a message

Summary:
Create a function that toggles the pin status of a message provided the request of the type ToggleMessagePinRequest. We check the permissions for the requester to ensure they have the correct permissions to manage message pins.

Linear: https://linear.app/comm/issue/ENG-3184/add-a-function-to-toggle-the-pin-status-of-a-message

To not block review while I figure out how to alert the client of a message pin, I've created a follow-up task to decide what to replace Promise<void> with: https://linear.app/comm/issue/ENG-3392/alert-the-client-of-a-message-pin-unpin

Depends on D6928

(Note: I put this in thread-updaters since I plan to return some kind of robotext and it seems like convention that it's handled here (i.e. removeMembers, joinThread, etc). Feel free to correct me if I've not scoped the conventions correctly though).

Test Plan: The test plan for this function will be combined into the test plan for the subsequent diff, since the endpoints and responders will be set up there.

Reviewers: atul, ginsu, tomek

Reviewed By: tomek

Subscribers: ashoat

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

Details

Provenance
rohanAuthored on Mar 2 2023, 12:45 PM
RohanK6 <rohan.khanderia@gmail.com>Committed on Apr 11 2023, 8:57 AM
Reviewer
tomek
Differential Revision
D6929: [keyserver] Add a function to toggle the pin status of a message
Parents
rCOMMf2a617f0a07e: [keyserver] Introduce a new thread permission for pinning / unpinning messages
Branches
Unknown
Tags
Unknown