feat: Disable fb/instagram if env variables are not configured (#7498)

This commit is contained in:
Vishnu Narayanan
2023-07-11 00:58:55 +05:30
committed by GitHub
parent a940f4c1d2
commit 332ab5888c

View File

@@ -21,6 +21,9 @@ export default {
},
},
computed: {
hasFbConfigured() {
return window.chatwootConfig?.fbAppId;
},
isActive() {
const { key } = this.channel;
if (Object.keys(this.enabledFeatures).length === 0) {
@@ -30,7 +33,7 @@ export default {
return this.enabledFeatures.channel_website;
}
if (key === 'facebook') {
return this.enabledFeatures.channel_facebook;
return this.enabledFeatures.channel_facebook && this.hasFbConfigured;
}
if (key === 'twitter') {
return this.enabledFeatures.channel_twitter;