Add the following to the textMessageCreationResponder in keyserver/src/responders/message-responders.js, right before return:
```
const reportedMessageID = rawMessageInfos[0].id;
if(reportedMessageID){
await createMessageReport(viewer, { messageID: reportedMessageID });
}
```
And see that when a user sends a text message, ashoat user recievies a message from commbot saying
>user user_name reported user_name’s message in chat titled chat_name
>> message
Add this to legacyMultimediaMessageCreationResponder right before return:
```
await createMessageReport(viewer, { messageID: id });
```
And see that when a user sends a multimedia message, ashoat user recievies a message from commbot saying
>user user_name reported user_name’s message in chat titled chat_name
> non-text message
So basically the message that is sent is also reported by the author
See that when chat between commbot and ashoat user doesn't exists it gets created, and when it exists it isn't created again, just a new message appears in the chat.
I also checked that when something fails and a variable gets the value of '[null]' or nullfetching the keyserver admin or creating the message with the report fail the creator throws an error. I did that by setting these variables to null or [], respectively, depending on what is possible,by hand. the app doesn't crashThis error will be handled on the client side and behaves reasonablyis meant to be an indicator is the report was successful or not. I did that by setting these variables to these values by hand.In all other cases the raport should succeed.