HomePhabricator
Diffusion Comm 86526362eb18

[keyserver] Add message report responder

Description

[keyserver] Add message report responder

Summary:
Linear issue: ENG-160, ENG-1700
We need the keyserver to send a message report to the keyserver admin from the commbot user when a user reports a message. This diff introdueces the endpoint responder.

Test Plan:
Add the following code to lib/actions/message-actions.js sendTextMessage right after the other fetchJSON:

const messageID = response.newMessageInfo.id;
await fetchJSON('create_message_report', { messageID });

And see that when a user sends a message, ashoat user recievies a message from commbot saying

user user_name reported user_name’s message in chat titled chat_name

message

So basically the message that is sent is also reported by the author

Reviewers: tomek, atul, abosh

Reviewed By: tomek

Subscribers: ashoat

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

Details

Provenance
InkaSokolowskaAuthored on Sep 30 2022, 3:33 AM
Reviewer
tomek
Differential Revision
D5022: [keyserver] Add message report responder
Parents
rCOMMb1ca4f27f09f: [lib, web, native] extract getting the keyserver admin
Branches
Unknown
Tags
Unknown