From 5e2c0f9c4a00639566f99b4299932d2f67d058bf Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Mon, 25 Nov 2024 08:38:07 -0800 Subject: [PATCH] feature/IO-3000-messaging-sockets-migration2 - Handle some of the PR notes Signed-off-by: Dave Richer --- client/src/components/chat-popup/chat-popup.component.jsx | 2 +- client/src/redux/messaging/messaging.sagas.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/chat-popup/chat-popup.component.jsx b/client/src/components/chat-popup/chat-popup.component.jsx index f99738cb1..7c0711fbc 100644 --- a/client/src/components/chat-popup/chat-popup.component.jsx +++ b/client/src/components/chat-popup/chat-popup.component.jsx @@ -31,7 +31,7 @@ export function ChatPopupComponent({ chatVisible, selectedConversation, toggleCh const client = useApolloClient(); // Apollo Client instance for cache operations // Lazy query for conversations - const [getConversations, { loading, data, refetch, fetchMore }] = useLazyQuery(CONVERSATION_LIST_QUERY, { + const [getConversations, { loading, data, refetch }] = useLazyQuery(CONVERSATION_LIST_QUERY, { fetchPolicy: "network-only", nextFetchPolicy: "network-only", skip: !chatVisible, diff --git a/client/src/redux/messaging/messaging.sagas.js b/client/src/redux/messaging/messaging.sagas.js index 012c05618..7194ea4dc 100644 --- a/client/src/redux/messaging/messaging.sagas.js +++ b/client/src/redux/messaging/messaging.sagas.js @@ -42,7 +42,7 @@ export function* openChatByPhone({ payload }) { } = yield client.query({ query: CONVERSATION_ID_BY_PHONE, variables: { phone: p.number }, - fetchPolicy: "no-cache" + fetchPolicy: "network-only" }); if (conversations.length === 0) {