ios: show pending invitee's received support messages in chat list preview

Mirror the android/desktop fix: a pending invitee's received support message was
dropped from the main chat list preview by the group itemTs comparison (received
broker clock vs locally-stamped group-event clock - not comparable). Bypass the
comparison when memberPending so the received support item surfaces in the preview.
This commit is contained in:
Narasimha-sc
2026-06-18 11:06:55 +00:00
parent bd7c6c3e85
commit 55bdaa2160
+5 -1
View File
@@ -661,7 +661,11 @@ final class ChatModel: ObservableObject {
chats[i].chatItems = switch cInfo {
case .group:
if let currentPreviewItem = chats[i].chatItems.first {
if cItem.meta.itemTs >= currentPreviewItem.meta.itemTs {
// 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 {
[cItem]
} else {
[currentPreviewItem]