MessagesSubscription

A response object that allows you to control a message subscription.

Functions

Link copied to clipboard
abstract suspend fun getPreviousMessages(start: Long? = null, end: Long? = null, limit: Int = 100): PaginatedResult<Message>

Get the previous messages that were sent to the room before the listener was subscribed.

Link copied to clipboard
abstract fun unsubscribe()

This method should be called when the subscription is no longer needed, it will make sure no further events will be sent to the subscriber and that references to the subscriber are cleaned up.