deleteMessage

open fun deleteMessage(    @NonNull context: Context,     @NonNull messageList: List<BaseMessage>,     @Nullable callback: STWOperationCallback<MessagingError>)

Call this method to delete an existing list of messages.

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

The message deletion will be executed one by one.

An event IConversationObservable will be delegated when the message is successfully sent or failed.

See also

Parameters

context

The application context

messageList

A list of message to delete

callback

This callback will be invoked to handle operation result :

  • Success : The request to delete messages is successfully sent to the server
  • Error : a local error occurred when trying to delete the messages

open fun deleteMessage(    @NonNull context: Context,     @NonNull messageId: String,     @Nullable callback: STWOperationCallback<MessagingError>)

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.

an event will be invoked when the message is successfully deleted from server IConversationObservable

See also

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