Chat
A chat instance.
This class allows performing actions over this specific chat like deleting the chat, sending a message or get the message history list
Functions
Link copied to clipboard
Removes a one to one chat.
Link copied to clipboard
fun fetchLastMessages(onCompletion: (Either<List<XMPPMessage>, SippoResourceError>) -> Unit)
Content copied to clipboard
Retrieves the last messages available to the current chat. The maximum number of messages to be obtained from the server if available is 15.
Link copied to clipboard
fun fetchMessagesBy(query: MessageQuery, onCompletion: (Either<List<XMPPMessage>, SippoResourceError>) -> Unit)
Content copied to clipboard
Retrieves the messages available to the current chat within the specified query.
Link copied to clipboard
Marks all messages as viewed since the last message received.
Link copied to clipboard
fun sendMessage(message: String, onCompletion: (SippoResourceError?) -> Unit)
Content copied to clipboard
Sends a text message to this chat.
Link copied to clipboard
fun setStatus(state: XMPPChatState, onCompletion: (SippoResourceError?) -> Unit)
Content copied to clipboard
Sets the current state of current chat instance. This method will send an empty Message with the state attached.