diff --git a/src/components/MediaSettings/VideoBackgroundEditor.vue b/src/components/MediaSettings/VideoBackgroundEditor.vue index f7b6e6fa7cf..8a4391f97cc 100644 --- a/src/components/MediaSettings/VideoBackgroundEditor.vue +++ b/src/components/MediaSettings/VideoBackgroundEditor.vue @@ -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 diff --git a/src/store/fileUploadStore.js b/src/store/fileUploadStore.js index 6087304948e..57df9972bd9 100644 --- a/src/store/fileUploadStore.js +++ b/src/store/fileUploadStore.js @@ -203,6 +203,10 @@ const mutations = { state.fileTemplates.push(template) state.fileTemplatesInitialised = true }, + + markFileTemplatesInitialisedForGuests(state) { + state.fileTemplatesInitialised = true + }, } const actions = { @@ -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()