diff --git a/apps/ios/Shared/Model/ChatModel.swift b/apps/ios/Shared/Model/ChatModel.swift index 92c0b39db0..ab7d2b6d9d 100644 --- a/apps/ios/Shared/Model/ChatModel.swift +++ b/apps/ios/Shared/Model/ChatModel.swift @@ -661,11 +661,12 @@ final class ChatModel: ObservableObject { chats[i].chatItems = switch cInfo { case .group: if let currentPreviewItem = chats[i].chatItems.first { - // For a pending invitee the support item (received via the broker clock) is the - // reason this preview updates; its itemTs isn't comparable to a locally-stamped - // group event, so always surface it rather than dropping it on a cross-clock check. - if cInfo.groupInfo?.membership.memberPending ?? false - || cItem.meta.itemTs >= currentPreviewItem.meta.itemTs { + // For a pending invitee, surface the latest support message in the preview (its + // broker-clock itemTs isn't comparable to a locally-stamped group event), but don't + // let a no-content group event re-cover a message already shown ("reviewed by admins"). + if cInfo.groupInfo?.membership.memberPending ?? false { + (cItem.content.hasMsgContent || !currentPreviewItem.content.hasMsgContent) ? [cItem] : [currentPreviewItem] + } else if cItem.meta.itemTs >= currentPreviewItem.meta.itemTs { [cItem] } else { [currentPreviewItem] diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt index 26e925791c..88c7b6d8e4 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt @@ -546,11 +546,12 @@ object ChatModel { is ChatInfo.Group -> { val currentPreviewItem = chat.chatItems.firstOrNull() if (currentPreviewItem != null) { - // For a pending invitee the support item (received via the broker clock) is the - // reason this preview updates; its itemTs isn't comparable to a locally-stamped - // group event, so always surface it rather than dropping it on a cross-clock check. - if (cInfo.groupInfo_?.membership?.memberPending == true || - cItem.meta.itemTs >= currentPreviewItem.meta.itemTs) { + // For a pending invitee, surface the latest support message in the preview (its + // broker-clock itemTs isn't comparable to a locally-stamped group event), but don't + // let a no-content group event re-cover a message already shown ("reviewed by admins"). + if (cInfo.groupInfo_?.membership?.memberPending == true) { + if (cItem.content.hasMsgContent || !currentPreviewItem.content.hasMsgContent) cItem else currentPreviewItem + } else if (cItem.meta.itemTs >= currentPreviewItem.meta.itemTs) { cItem } else { currentPreviewItem