addMessage

abstract suspend fun addMessage(message: Message)

Adds the specified message to the messaging service. If no conversation with the specified Message.conversationId exists, this call is ignored. If a message with the same Message.id exists, it will be replaced.

Note that if message is the first for a new conversation, addConversation must have been called for that conversation before this call. For all subsequent messages to the same conversation, only calling addMessage suffices.

It is the responsibility of the caller to make sure that message has a universally unique Message.id.

Parameters

message

the message to add.