feat: Disable fb/instagram if env variables are not configured (#7498)
This commit is contained in:
@@ -21,6 +21,9 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
hasFbConfigured() {
|
||||||
|
return window.chatwootConfig?.fbAppId;
|
||||||
|
},
|
||||||
isActive() {
|
isActive() {
|
||||||
const { key } = this.channel;
|
const { key } = this.channel;
|
||||||
if (Object.keys(this.enabledFeatures).length === 0) {
|
if (Object.keys(this.enabledFeatures).length === 0) {
|
||||||
@@ -30,7 +33,7 @@ export default {
|
|||||||
return this.enabledFeatures.channel_website;
|
return this.enabledFeatures.channel_website;
|
||||||
}
|
}
|
||||||
if (key === 'facebook') {
|
if (key === 'facebook') {
|
||||||
return this.enabledFeatures.channel_facebook;
|
return this.enabledFeatures.channel_facebook && this.hasFbConfigured;
|
||||||
}
|
}
|
||||||
if (key === 'twitter') {
|
if (key === 'twitter') {
|
||||||
return this.enabledFeatures.channel_twitter;
|
return this.enabledFeatures.channel_twitter;
|
||||||
|
|||||||
Reference in New Issue
Block a user