Mention

interface Mention

Represents a mention token inside the message composer.

Built-in types are User, Channel, Here, Role, and Group. You can extend this interface to define custom mentions if needed.

Inheritors

Types

Link copied to clipboard
object Channel : Mention

An @channel mention: notifies every channel member.

Link copied to clipboard
data class Group(val group: UserGroup) : Mention

A user-group mention.

Link copied to clipboard
object Here : Mention

An @here mention: notifies online channel members.

Link copied to clipboard
data class Role(val role: String) : Mention

A role mention (e.g. @admin).

Link copied to clipboard
data class User(val user: User) : Mention

A user mention.

Properties

Link copied to clipboard
abstract val display: String

The primary display text of the mention, used when inserting a token into the composer. Implementations must guarantee a non-empty value so autocomplete and linkification produce a stable @token even when the underlying source lacks a human-readable name.

Link copied to clipboard
open val tokens: List<String>

All candidate @<token> forms that should match this mention in rendered message text.

Link copied to clipboard
abstract val type: MentionType

The type of the mention.