MessageContent

fun MessageContent(message: Message, currentUser: User?, modifier: Modifier = Modifier, onLongItemClick: (Message) -> Unit = {}, onGiphyActionClick: (GiphyAction) -> Unit = {}, onQuotedMessageClick: (Message) -> Unit = {}, onUserMentionClick: (User) -> Unit = {}, onLinkClick: (Message, String) -> Unit? = null, messageContentFactory: MessageContentFactory = ChatTheme.messageContentFactory, onMediaGalleryPreviewResult: (MediaGalleryPreviewResult?) -> Unit = {}, giphyEphemeralContent: @Composable () -> Unit = { messageContentFactory.MessageGiphyContent( message = message, onGiphyActionClick = onGiphyActionClick, ) }, deletedMessageContent: @Composable () -> Unit = { messageContentFactory.MessageDeletedContent(modifier = modifier) }, regularMessageContent: @Composable () -> Unit = { DefaultMessageContent( message = message, currentUser = currentUser, onLongItemClick = onLongItemClick, messageContentFactory = messageContentFactory, onMediaGalleryPreviewResult = onMediaGalleryPreviewResult, onQuotedMessageClick = onQuotedMessageClick, onLinkClick = onLinkClick, onUserMentionClick = onUserMentionClick, ) })

Represents the default message content within the bubble that can show different UI based on the message state.

Parameters

message

The message to show.

currentUser

The currently logged in user.

modifier

Modifier for styling.

onLongItemClick

Handler when the item is long clicked.

onGiphyActionClick

Handler for Giphy actions.

onQuotedMessageClick

Handler for quoted message click action.

onLinkClick

Handler for clicking on a link in the message.

messageContentFactory

Factory for creating message content.

onMediaGalleryPreviewResult

Handler when the user selects an option in the Media Gallery Preview screen.

giphyEphemeralContent

Composable that represents the default Giphy message content.

deletedMessageContent

Composable that represents the default content of a deleted message.

regularMessageContent

Composable that represents the default regular message content, such as attachments and text.