Text

data class Text(val text: String, val mentions: List<BackupMessageContent.Text.Mention> = emptyList(), val quotedMessageId: String? = null) : BackupMessageContent

Represents a text message with possible user mentions and serves as a part of the backup message content.

Throws

IllegalArgumentException

if any mention's range exceeds the length of the text.

Constructors

Link copied to clipboard
constructor(text: String, mentions: List<BackupMessageContent.Text.Mention> = emptyList(), quotedMessageId: String? = null)

Types

Link copied to clipboard
data class Mention(val userId: BackupQualifiedId, val start: Int, val length: Int)

Represents a mention of a user in a text.

Properties

Link copied to clipboard

A list of mentions within the text. Each mention identifies a specific user and its position in the text.

Link copied to clipboard
val quotedMessageId: String? = null

The ID of a message that is being quoted by this one, if any.

Link copied to clipboard
val text: String

The content of the text message.