ChatThreadHandler

Instance of a thread handler. This instance will contain the most up-to-date thread, even newer than the thread it was created from.

This object will not transfer any changes to the parent object and all updates are contained within this class. It's up to the client to keep the instance alive as long as they need it.

It has no side effects attached to it.

Types

Link copied to clipboard

Listener allowing to receive changes to a chat thread.

Functions

Link copied to clipboard

Returns new instance of field handler for this ChatThread.

Link copied to clipboard

Returns new instance of thread event handler for this ChatThread.

Link copied to clipboard
abstract fun get(): ChatThread

Returns the most up-to-date thread with updated properties. This value is internally stored and is safe to call in main-thread context.

Registers a listener which can be cancelled any time. The thread registers for listeners to thread recovered events (triggered by refresh), message events (triggered by messages and its methods) and metadata events.

Link copied to clipboard

Returns new instance of message handler for this ChatThread.

Link copied to clipboard
abstract fun refresh()

Notifies the server asynchronously that client wants the thread to be refreshed. The request can be performed even if the client doesn't expect new data. In which case the get returns updated value anyway.

Link copied to clipboard
abstract fun setName(name: String)

Notifies the server asynchronously that client wants to change the thread name to the supplied name. The change can fail, though if it doesn't get methods will return updated thread.