Fix beta build: satisfy MessageContext hook deps.
Unit Tests / test (pull_request) Successful in 13s

CI=true turns the exhaustive-deps warnings into a failed build:beta on the deploy runner.
Closes #139.
This commit is contained in:
westfarn committed 2026-10-25 08:19:10 -05:00
1 parent ae59c2731d
commit 5fdc1377a0
2 files changed
+30 -7

No files matched your search

@@ -95,7 +95,7 @@ const MessageProvider = ( {children}: MessageProviderProps) => {
setActivityHistory([])
}
async function GetConversationDetails(conversationId: number | undefined) {
const GetConversationDetails = useCallback(async (conversationId: number | undefined) => {
if (!conversationId) {
setConversationDetails([])
return
@@ -134,7 +134,7 @@ const MessageProvider = ( {children}: MessageProviderProps) => {
} catch (err) {
console.log('Failed to refetch conversation after reconnect', err)
}
}
}, [setConversationDetails])
const schedulePostStreamRefetch = useCallback(() => {
if (refetchTimerRef.current) clearTimeout(refetchTimerRef.current)
@@ -145,11 +145,11 @@ const MessageProvider = ( {children}: MessageProviderProps) => {
refetchTimerRef.current = setTimeout(() => {
void GetConversationDetails(conversationId)
}, 800)
}, [])
}, [GetConversationDetails])
useEffect(() => {
GetConversationDetails(selectedConversation)
}, [selectedConversation])
void GetConversationDetails(selectedConversation)
}, [selectedConversation, GetConversationDetails])
useEffect(() => {
return () => {
@@ -198,9 +198,9 @@ const MessageProvider = ( {children}: MessageProviderProps) => {
}
if (selectedConversationRef.current) {
GetConversationDetails(selectedConversationRef.current)
void GetConversationDetails(selectedConversationRef.current)
}
}, [reconnectGeneration])
}, [reconnectGeneration, GetConversationDetails, setConversationDetails])
useEffect(() => {
/* register a consistent channel name for identifing this chat messages */