Webhook for message.create

Hi, we are working on receiving messages that come from an agent / bot configured on your platform. As explained in the documentation (https://developer.tiledesk.com/apis/tutorials/rest-api/sending-and-receiving-messages#receiving-new-messages-notifications-using-webhooks), we configured the webhook by registering the subscription and passing the value “message.create” as an event parameter. We noticed that this last event forwards not only outgoing messages (i.e. from your platform to our server), but also incoming messages and notifications relating to the reassignment of a chat to another operator / bot. Is there an event that can only forward messages that are sent by the operator / bot?

Andrea

Hi Andrea

There is no event that is able to distinguish between the messages sent by you and those received (the chat is actually a group chat, so the senders can be many, even simultaneous).
You can use the “senderId” field to discriminate the messages you are interested in versus those to be discarded.

I hope I was helpful.