DraftMessage

@Immutable
data class DraftMessage(    val id: String = "",     val cid: String = "",     val text: String = "",     val parentId: String? = null,     val attachments: List<Attachment> = listOf(),     val mentionedUsersIds: List<String> = listOf(),     val extraData: Map<String, Any> = mapOf(),     val silent: Boolean = false,     val showInChannel: Boolean = false,     val replyMessage: Message? = null) : CustomObject, ComparableFieldProvider

Model holding data about a draft message.

Constructors

Link copied to clipboard
constructor(    id: String = "",     cid: String = "",     text: String = "",     parentId: String? = null,     attachments: List<Attachment> = listOf(),     mentionedUsersIds: List<String> = listOf(),     extraData: Map<String, Any> = mapOf(),     silent: Boolean = false,     showInChannel: Boolean = false,     replyMessage: Message? = null)

Types

Link copied to clipboard
class Builder

Properties

Link copied to clipboard

The list of message attachments

Link copied to clipboard
val cid: String

Channel unique identifier in : format

Link copied to clipboard
open override val extraData: Map<String, Any>

All the custom data provided for this message

Link copied to clipboard
val id: String

The unique string identifier of the message. This is either created by Stream or set on the client side when the message is added.

Link copied to clipboard

The list of user mentioned in the message

Link copied to clipboard
val parentId: String? = null

The ID of the parent message, if the message is a thread reply

Link copied to clipboard
val replyMessage: Message? = null

The message that is being replied to.

Link copied to clipboard
val showInChannel: Boolean = false

Whether thread reply should be shown in the channel as well

Link copied to clipboard
val silent: Boolean = false

Whether message is silent or not

Link copied to clipboard

The text of this message

Functions

Link copied to clipboard
open override fun getComparableField(fieldName: String): Comparable<*>?

Gets a comparable fields from a name.

Link copied to clipboard

Identifier of message. The message can't be considered the same if the id of the message AND the id of a quoted message are not the same.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String

Inherited functions

Link copied to clipboard
open fun <T> getExtraValue(key: String, default: T): T

Returns the value associated with the given key, or default if the key is not present in the extraData.