miniapp / com.rakuten.tech.mobile.miniapp.js.chat / ChatBridgeDispatcher / sendMessageToContact

sendMessageToContact

abstract fun sendMessageToContact(message: MessageToContact, onSuccess: (contactId: String?) -> Unit, onError: (message: String) -> Unit): Unit

Triggered when Mini App wants to send a message to a single contact. Should invoke onSuccess with the contact ID to send the message. If the user wants to cancel sending the message, should invoked onSuccess with null. Should invoke onError when there was an error.