diff --git a/CHANGELOG.md b/CHANGELOG.md index c38929378f7..67c2d76d346 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -67,6 +67,7 @@ ## stream-chat-android-compose ### 🐞 Fixed +- Fix error messages text being overridden by the default error message. [#5551](https://github.com/GetStream/stream-chat-android/pull/5551) ### ⬆️ Improved diff --git a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageContainer.kt b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageContainer.kt index b30290df982..dabeb06b240 100644 --- a/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageContainer.kt +++ b/stream-chat-android-compose/src/main/java/io/getstream/chat/android/compose/ui/messages/list/MessageContainer.kt @@ -284,7 +284,9 @@ internal fun DefaultMessageModeratedContent(moderatedMessageItemState: Moderated modifier = Modifier .fillMaxWidth() .padding(vertical = 12.dp, horizontal = 16.dp), - text = stringResource(id = R.string.stream_compose_message_moderated), + text = moderatedMessageItemState.message.text + .takeUnless { it.isBlank() } + ?: stringResource(id = R.string.stream_compose_message_moderated), color = ChatTheme.colors.textLowEmphasis, style = ChatTheme.typography.footnoteBold, textAlign = TextAlign.Center,