diff --git a/src/services/AttachmentResolver.js b/src/services/AttachmentResolver.js index 1f99caef392..4da5b474629 100644 --- a/src/services/AttachmentResolver.js +++ b/src/services/AttachmentResolver.js @@ -47,7 +47,7 @@ export default class AttachmentResolver { } async #updateAttachmentList() { - return setAttachmentList({ documentId: this.#documentId, shareToken: this.#shareToken }) + return setAttachmentList({ documentId: this.#documentId, session: this.#session, shareToken: this.#shareToken }) } /* diff --git a/src/store/index.js b/src/store/index.js index 5629fb82e29..d3f2eccd72f 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -96,11 +96,11 @@ export const textModule = { setHeadings({ commit }, value) { commit(SET_HEADINGS, value) }, - async setAttachmentList({ commit, state }, { documentId, shareToken }) { + async setAttachmentList({ commit }, { documentId, session, shareToken }) { const response = await axios.post(generateUrl('/apps/text/attachments'), { - documentId: state.currentSession?.documentId ?? documentId, - sessionId: state.currentSession?.id, - sessionToken: state.currentSession?.token, + documentId: session?.documentId ?? documentId, + sessionId: session?.id, + sessionToken: session?.token, shareToken, })