fix: pass selectedCommThreadId to refreshSelectedClientTimeline

The function was called without arguments in two places, causing
contactId to be empty string and clearing clientTimelineItems to [].
Messages disappeared from the chat panel as a result.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ruslan Bakiev
2026-02-24 15:45:19 +07:00
parent 195df8e16a
commit 3775d881f9

View File

@@ -311,7 +311,7 @@ async function refetchAllCrmQueries() {
refetchChatMessages(), refetchChatMessages(),
refetchChatConversations(), refetchChatConversations(),
]); ]);
await refreshSelectedClientTimeline(); await refreshSelectedClientTimeline(selectedCommThreadId.value);
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -1177,7 +1177,7 @@ watch(selectedCommThreadId, () => {
clientTimelineItems.value = []; clientTimelineItems.value = [];
return; return;
} }
void refreshSelectedClientTimeline().catch(() => undefined); void refreshSelectedClientTimeline(selectedCommThreadId.value).catch(() => undefined);
}); });
// Watch: URL sync // Watch: URL sync