From 03719cede0663bbf8e3ee163a4e24ea43627749b Mon Sep 17 00:00:00 2001 From: Daniel Bates Date: Mon, 16 Mar 2026 02:21:18 -0700 Subject: [PATCH] fix: Correct reversed message status indicators for API channel (#13594) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description Fixes the reversed message delivery status indicators for the API channel. The API inbox was grouped with the web widget inbox in the `isDelivered` computed property, causing both to treat a `sent` status as `delivered`. Since the API channel provides real `sent`/`delivered`/`read` status values from external systems (unlike the web widget which has no separate delivery confirmation), the API inbox needs its own handling. **Before this fix:** - Status `sent` (0) → incorrectly showed delivered checkmarks - Status `delivered` (1) → incorrectly showed "Sending" spinner **After this fix:** - Status `sent` → correctly shows sent indicator (single checkmark) - Status `delivered` → correctly shows delivered indicator (double checkmarks) - Status `read` → unchanged (already worked correctly) The web widget inbox behavior is unchanged — it still treats `sent` as `delivered` since it lacks a separate delivery confirmation mechanism. Fixes #13576 ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) ## How Has This Been Tested? Verified by code review that the computed properties now correctly map API channel message statuses: - `isSent` returns `true` when `status === 'sent'` for API inbox - `isDelivered` returns `true` when `status === 'delivered'` for API inbox - `isRead` unchanged — already checks `status === 'read'` for API inbox - Web widget inbox logic is unchanged ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [x] I have commented on my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings *This PR was created with the assistance of Claude Opus 4.6 by Anthropic. Happy to make any adjustments! Reviewed and submitted by a human.* Co-authored-by: Your Name Co-authored-by: Claude Opus 4.6 Co-authored-by: Muhsin Keloth --- .../dashboard/components-next/message/MessageMeta.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/app/javascript/dashboard/components-next/message/MessageMeta.vue b/app/javascript/dashboard/components-next/message/MessageMeta.vue index 1b0947e6d..f26339cbb 100644 --- a/app/javascript/dashboard/components-next/message/MessageMeta.vue +++ b/app/javascript/dashboard/components-next/message/MessageMeta.vue @@ -67,6 +67,9 @@ const isSent = computed(() => { return sourceId.value && status.value === MESSAGE_STATUS.SENT; } + // API inbox messages use real sent/delivered/read status values from the external system. + if (isAPIInbox.value) return status.value === MESSAGE_STATUS.SENT; + // All messages will be mark as sent for the Line channel, as there is no source ID. if (isALineChannel.value) return true; @@ -86,8 +89,10 @@ const isDelivered = computed(() => { ) { return sourceId.value && status.value === MESSAGE_STATUS.DELIVERED; } - // All messages marked as delivered for the web widget inbox and API inbox once they are sent. - if (isAWebWidgetInbox.value || isAPIInbox.value) { + // API inbox messages use real delivered status from the external system. + if (isAPIInbox.value) return status.value === MESSAGE_STATUS.DELIVERED; + // All messages marked as delivered for the web widget inbox once they are sent. + if (isAWebWidgetInbox.value) { return status.value === MESSAGE_STATUS.SENT; } if (isALineChannel.value) {