MessageText

fun MessageText(message: Message, currentUser: User?, modifier: Modifier = Modifier, onLongItemClick: (Message) -> Unit, onLinkClick: (Message, String) -> Unit? = null, onUserMentionClick: (User) -> Unit = {})

Default text element for messages, with extra styling and padding for the chat bubble.

It detects if we have any annotations/links in the message, and if so, it uses the ClickableText component to allow for clicks on said links, that will open the link.

Alternatively, it just shows a basic Text element.

Parameters

message

Message to show.

currentUser

The currently logged in user.

modifier

Modifier for styling.

onLongItemClick

Handler used for long pressing on the message text.

onLinkClick

Handler used for clicking on a link in the message.