MessageComposerState

data class MessageComposerState(    val inputValue: String = "",     val attachments: List<Attachment> = emptyList(),     val action: MessageAction? = null,     val validationErrors: List<ValidationError> = emptyList(),     val mentionSuggestions: List<User> = emptyList(),     val commandSuggestions: List<Command> = emptyList(),     val coolDownTime: Int = 0,     val messageMode: MessageMode = MessageMode.Normal,     val alsoSendToChannel: Boolean = false,     val ownCapabilities: Set<String> = setOf(),     val hasCommands: Boolean = false,     val currentUser: User? = null)

Represents the state within the message input.

Parameters

inputValue

The current text value that's within the input.

attachments

The currently selected attachments.

action

The currently active MessageAction.

validationErrors

The list of validation errors.

mentionSuggestions

The list of users that can be used to autocomplete the mention.

commandSuggestions

The list of commands to be displayed in the command suggestion popup.

coolDownTime

The amount of time left until the user is allowed to send the next message.

messageMode

The message mode that's currently active.

alsoSendToChannel

If the message will be shown in the channel after it is sent.

ownCapabilities

Set of capabilities the user is given for the current channel. For a full list @see ChannelCapabilities.

hasCommands

Whether there are any commands available.

currentUser

The currently logged in user.

Constructors

Link copied to clipboard
fun MessageComposerState(    inputValue: String = "",     attachments: List<Attachment> = emptyList(),     action: MessageAction? = null,     validationErrors: List<ValidationError> = emptyList(),     mentionSuggestions: List<User> = emptyList(),     commandSuggestions: List<Command> = emptyList(),     coolDownTime: Int = 0,     messageMode: MessageMode = MessageMode.Normal,     alsoSendToChannel: Boolean = false,     ownCapabilities: Set<String> = setOf(),     hasCommands: Boolean = false,     currentUser: User? = null)

Properties

Link copied to clipboard
val action: MessageAction? = null
Link copied to clipboard
val alsoSendToChannel: Boolean = false
Link copied to clipboard
val attachments: List<Attachment>
Link copied to clipboard
val commandSuggestions: List<Command>
Link copied to clipboard
val coolDownTime: Int = 0
Link copied to clipboard
val currentUser: User? = null
Link copied to clipboard
val hasCommands: Boolean = false
Link copied to clipboard
val inputValue: String
Link copied to clipboard
val mentionSuggestions: List<User>
Link copied to clipboard
val messageMode: MessageMode
Link copied to clipboard
val ownCapabilities: Set<String>
Link copied to clipboard
val validationErrors: List<ValidationError>