Skip to content

Commit

Permalink
Merge pull request #5486 from nextcloud/backport/5484/stable28
Browse files Browse the repository at this point in the history
[stable28] fix(attachments): Don't use currentSession for fetching attachments
  • Loading branch information
mejo- committed Mar 14, 2024
2 parents 225266c + d13cf3a commit 5bd0823
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/services/AttachmentResolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
}

/*
Expand Down
8 changes: 4 additions & 4 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})

Expand Down

0 comments on commit 5bd0823

Please sign in to comment.