MessageComposerState

data class MessageComposerState @JvmOverloads constructor(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 linkPreviews: List<LinkPreview> = 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, val recording: RecordingState = RecordingState.Idle)

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.

linkPreviews

The list of links found in inputValue to be previewed.

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.

recording

The current recording state.

Constructors

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

Properties

Link copied to clipboard
val action: MessageAction? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard