Skip to content

Commit

Permalink
Merge pull request #9621 from nextcloud/bugfix/9620/guests-login-prompt
Browse files Browse the repository at this point in the history
fix(MediaSettings): Fix guests being prompted with login window when blurring background
  • Loading branch information
nickvergessen authored May 25, 2023
2 parents 6626bff + 75e7216 commit d4cc5e2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/components/MediaSettings/VideoBackgroundEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ export default {
async mounted() {
this.loadBackground()

if (this.$store.getters.getUserId() === null) {
console.debug('Skip Talk backgrounds folder check and setup for participants that are not logged in')
return
}

const userRoot = '/files/' + this.$store.getters.getUserId()
const relativeBackgroundsFolderPath = this.$store.getters.getAttachmentFolder() + '/Backgrounds'
const absoluteBackgroundsFolderPath = userRoot + relativeBackgroundsFolderPath
Expand Down
12 changes: 11 additions & 1 deletion src/store/fileUploadStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ const mutations = {
state.fileTemplates.push(template)
state.fileTemplatesInitialised = true
},

markFileTemplatesInitialisedForGuests(state) {
state.fileTemplatesInitialised = true
},
}

const actions = {
Expand Down Expand Up @@ -427,7 +431,13 @@ const actions = {
commit('removeFileFromSelection', temporaryMessageId)
},

async getFileTemplates({ commit }) {
async getFileTemplates({ commit, getters }) {
if (getters.getUserId() === null) {
console.debug('Skip file templates setup for participants that are not logged in')
commit('markFileTemplatesInitialisedForGuests')
return
}

try {
const response = await getFileTemplates()

Expand Down

0 comments on commit d4cc5e2

Please sign in to comment.