Improe chat response handling for archive/tagging.

This commit is contained in:
Patrick Fic
2021-12-20 14:46:57 -08:00
parent b8e7c8f341
commit 76a00794f1
6 changed files with 74 additions and 37 deletions

View File

@@ -13,6 +13,7 @@ export default function ChatArchiveButton({ conversation }) {
await updateConversation({
variables: { id: conversation.id, archived: !conversation.archived },
refetchQueries: ["CONVERSATION_LIST_QUERY"],
});
setLoading(false);

View File

@@ -16,6 +16,16 @@ export default function ChatConversationTitleTags({ jobConversations }) {
conversationId: convId,
jobId: jobId,
},
update(cache) {
cache.modify({
id: cache.identify({ id: convId, __typename: "conversations" }),
fields: {
job_conversations(ex) {
return ex.filter((e) => e.jobid !== jobId);
},
},
});
},
});
logImEXEvent("messaging_remove_job_tag", {
conversationId: convId,