handleDraftMessage

fun handleDraftMessage(    context: Context,     conversationId: Int?,     text: String? = null,     attachment: Attachment? = null,     isFromNfc: Boolean = false,     callback: CompletionCallback?)

Call this method to add, update or remove drafts in conversations from local database.

ConversationId is required in order to add drafts

If the text and the attachment are null, the draft will be deleted, otherwise the draft will be added or updated.

The completion callback in this method is useful when an error occurred while updating or creating a draft in the local database or when the message is added, updated or deleted successfully in the local database.

See also

Parameters

context

The application context

conversationId

Conversation ID

text

Message content text

attachment

Attachment model

callback

This callback will be invoked to handle operation result : Success : the draft is successfully added to the local data base Error : an error occurred when trying to add the draft to the local data base