From 15a67446ea259d3574cc7f0d848ba7b4c81887d8 Mon Sep 17 00:00:00 2001 From: isra el Date: Wed, 11 Jun 2025 11:27:55 +0300 Subject: [PATCH] chore(web): only show message status if device is using latest version and message is sent after v2.6 release --- web/app/(app)/dashboard/(components)/message-history.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/web/app/(app)/dashboard/(components)/message-history.tsx b/web/app/(app)/dashboard/(components)/message-history.tsx index b240c80..48699bb 100644 --- a/web/app/(app)/dashboard/(components)/message-history.tsx +++ b/web/app/(app)/dashboard/(components)/message-history.tsx @@ -533,7 +533,7 @@ function StatusDetailsDialog({ message }: { message: any }) { ); } -function MessageCard({ message, type }) { +function MessageCard({ message, type, device }) { const isSent = type === 'sent' const formattedDate = new Date( @@ -546,6 +546,8 @@ function MessageCard({ message, type }) { year: 'numeric', }) + const shouldShowStatus = device?.appVersionCode >= 14 && new Date(message?.createdAt) > new Date('2025-04-11') + return (
- {isSent && ( + {isSent && shouldShowStatus && (
@@ -906,6 +908,7 @@ export default function MessageHistory() { key={message._id} message={message} type={message.sender ? 'received' : 'sent'} + device={devices?.data?.find((device) => device._id === currentDevice)} /> ))}