Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(MediaSettings): Fix guests being prompted with login window when blurring background #9621

Merged
merged 2 commits into from
May 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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