Skip to content

Commit

Permalink
Merge pull request #5485 from nextcloud/backport/5484/stable27
Browse files Browse the repository at this point in the history
[stable27] fix(attachments): Don't use currentSession for fetching attachments
  • Loading branch information
mejo- committed Mar 14, 2024
2 parents 1cf1a7e + d93f4a8 commit f813125
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions js/editor.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-editors.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-editors.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

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 f813125

Please sign in to comment.