mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🔑 fix: Update Conversation Mutation to use ID from Payload (#8758)
This commit is contained in:
parent
32081245da
commit
8a1a38f346
3 changed files with 6 additions and 5 deletions
|
|
@ -55,9 +55,10 @@ export const useUpdateConversationMutation = (
|
|||
return useMutation(
|
||||
(payload: t.TUpdateConversationRequest) => dataService.updateConversation(payload),
|
||||
{
|
||||
onSuccess: (updatedConvo) => {
|
||||
queryClient.setQueryData([QueryKeys.conversation, id], updatedConvo);
|
||||
updateConvoInAllQueries(queryClient, id, () => updatedConvo);
|
||||
onSuccess: (updatedConvo, payload) => {
|
||||
const targetId = payload.conversationId || id;
|
||||
queryClient.setQueryData([QueryKeys.conversation, targetId], updatedConvo);
|
||||
updateConvoInAllQueries(queryClient, targetId, () => updatedConvo);
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue