'How to send an event from ASP.NET Core backend to Flutter

I have an end-to-end encrypted chat on mobile side, which is written in Flutter. The only place where messages are stored is the device (actually, two devices of both of the chat parties). I want to implement a reporting feature that will send last N messages including the reported one to the server (ASP.NET Core GraphQL API) for future review by the admins. My initial plan was to just send a copy of the message thread, but here is the problem: Since there's no messages in the database, there's no way to check if a person sending the report request is lying about the content of the messages. The request will look something like this:

{
    "reportedPersonId": 1,
    "messages": [
        {
            "senderId": 2,
            "content": "Hello"
        },
        {
            "senderId": 1,
            "content": "Something offensive"
        },
    ]
}

As you can see I can put anything I want in these messages and reviewer will not have an opportunity to figure out if that's true. The idea I have right now is to send both copies of the message thread to the server, however I don't know how to invoke sending those messages from a reportee's device on reporter's request. On mobile side we use Sendbird's Flutter SDK, which simplifies the chat but makes it more difficult to send some kind of custom event to trigger sending the messages from both chat parties. I know that could be achieved with SignalR, but I'm open to ideas and opinions.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source