HomePhabricator
Diffusion Comm 2954159c828e

[keyserver] Prevent non-composable message types from being pinned on the…

Description

[keyserver] Prevent non-composable message types from being pinned on the keyserver

Summary:
On the client, we prevent non-composable message types (specifically robotext) messages from being pinned. This means only text and multimedia should be able to be pinned. In light of the urgent issues arising with source messages / inconsistency across keyserver and client, it'd be good to make sure we also cover this check directly on the server when a client requests to pin/unpin a message.

One thing to note is that with ENG-4981, one of the short term solutions was to just disable the pin action for sidebar source messages. If I can't resolve it and have to resort to the short-term solution, I'll do that in a different diff to keep this one just a 'unifying client and server logic' change.

Here, we throw a error if the target message that is trying to be pinned is not composable, matching the behavior on the client.

Depends on D9238

Part of ENG-4849

Test Plan: Confirmed that passing a non-composable message ID in the payload ends up in a server error

Reviewers: atul, ginsu, ashoat

Reviewed By: ashoat

Subscribers: ashoat, tomek

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