deleteMessage

fun deleteMessage(    context: Context,     messageId: Int?,     callback: CompletionCallback?)

Call this method to delete an existing message from local Database and server.

This method is automatically deletes the message and its attachment if it exists and sends the necessary requests to the back-end.

Parameters

context

The application context

messageId

The identifier of the message to delete

callback

This callback will be invoked to handle operation result :

  • Success : The request to delete message is successfully sent to the server

  • Error : a local error occurred when trying to delete a message