diff --git a/src/app/integrations/integrations.component.ts b/src/app/integrations/integrations.component.ts index 7fcc895f17a4..63f72936e4e4 100644 --- a/src/app/integrations/integrations.component.ts +++ b/src/app/integrations/integrations.component.ts @@ -216,43 +216,57 @@ export class IntegrationsComponent implements OnInit, OnDestroy { let whatsappApp = response.apps.find(a => (a.title === APPS_TITLE.WHATSAPP && a.version === "v2")); if (environment['whatsappConfigUrl']) { if (whatsappApp) { - whatsappApp.runUrl = environment['whatsappConfigUrl']; + whatsappApp.runURL = environment['whatsappConfigUrl']; whatsappApp.channel = "whatsapp"; } else { whatsappApp = { - runUrl: environment['whatsappConfigUrl'], + runURL: environment['whatsappConfigUrl'], channel: "whatsapp" } } + } else { + if (whatsappApp) { + whatsappApp.channel = "whatsapp"; + } } this.availableApps.push(whatsappApp); let messengerApp = response.apps.find(a => (a.title === APPS_TITLE.MESSENGER && a.version === "v2")); if (environment['messengerConfigUrl']) { if (messengerApp) { - messengerApp.runUrl = environment['messengerConfigUrl']; + messengerApp.runURL = environment['messengerConfigUrl']; messengerApp.channel = "messenger"; } else { messengerApp = { - runUrl: environment['messengerConfigUrl'], + runURL: environment['messengerConfigUrl'], channel: "messenger" } } } + else { + if (messengerApp) { + messengerApp.channel = "messenger"; + } + } this.availableApps.push(messengerApp); let telegramApp = response.apps.find(a => (a.title === APPS_TITLE.TELEGRAM && a.version === "v2")); if (environment['telegramConfigUrl']) { if (telegramApp) { - telegramApp.runUrl = environment['telegramConfigUrl']; + telegramApp.runURL = environment['telegramConfigUrl']; telegramApp.channel = "telegram"; } else { telegramApp = { - runUrl: environment['telegramConfigUrl'], + runURL: environment['telegramConfigUrl'], channel: "telegram" } } } + else { + if (telegramApp) { + telegramApp.channel = "telegram"; + } + } this.availableApps.push(telegramApp); resolve(true); @@ -275,7 +289,7 @@ export class IntegrationsComponent implements OnInit, OnDestroy { this.integrationSelectedName = "external"; this.showInIframe = true; let app = this.availableApps.find(a => a.channel === integration.key); - this.renderUrl = app.runUrl; + this.renderUrl = app.runURL; } else { this.showInIframe = false; } diff --git a/src/app/integrations/utils.ts b/src/app/integrations/utils.ts index e98c5ec079f4..894c30e4191e 100644 --- a/src/app/integrations/utils.ts +++ b/src/app/integrations/utils.ts @@ -97,7 +97,7 @@ export const INTEGRATION_LIST_ARRAY = [ { name: "Messenger", category: INTEGRATIONS_CATEGORIES.CHANNEL, key: INTEGRATIONS_KEYS.MESSENGER, src_icon: "assets/img/int/messenger-icon.png", src_logo: "assets/img/int/messenger-logo.jpeg", pro: true, plan: 'Premium' }, //{ name: "Pipedrive", category: INTEGRATIONS_CATEGORIES.CRM, key: INTEGRATIONS_KEYS.PIPEDRIVE, src_icon: "assets/img/int/pipedrive-icon.png", src_logo: "assets/img/int/pipedrive-logo.png", pro: true, plan: 'Premium' }, //{ name: "Salesforce", category: INTEGRATIONS_CATEGORIES.CRM, key: INTEGRATIONS_KEYS.SALESFORCE, src_icon: "assets/img/int/salesforce-icon.png", src_logo: "assets/img/int/salesforce-logo.png", pro: true, plan: 'Premium' }, - { name: "Telegram", category: INTEGRATIONS_CATEGORIES.CHANNEL, key: INTEGRATIONS_KEYS.TELEGRAM, src_icon: "assets/img/int/telegram-icon.png", src_logo: "assets/img/int/telegram-logo.png", pro: true, plan: 'Premium' }, + { name: "Telegram", category: INTEGRATIONS_CATEGORIES.CHANNEL, key: INTEGRATIONS_KEYS.TELEGRAM, src_icon: "assets/img/int/telegram-icon.png", src_logo: "assets/img/int/telegram-logo.png", pro: false, plan: 'Sandbox' }, { name: "WhatsApp", category: INTEGRATIONS_CATEGORIES.CHANNEL, key: INTEGRATIONS_KEYS.WHATSAPP, src_icon: "assets/img/int/whatsapp-icon.png", src_logo: "assets/img/int/whatsapp-logo.png", pro: true, plan: 'Premium' }, //{ name: "Zapier", category: INTEGRATIONS_CATEGORIES.INT_PLAT, key: INTEGRATIONS_KEYS.ZAPIER, src_icon: "assets/img/int/zapier-icon.png", src_logo: "assets/img/int/zapier-logo.svg", pro: true, plan: 'Basic' }, //{ name: "Zendesk", category: INTEGRATIONS_CATEGORIES.LIVE_CHAT, key: INTEGRATIONS_KEYS.ZENDESK, src_icon: "assets/img/int/zendesk-icon.png", src_logo: "assets/img/int/zendesk-logo.png", pro: true, plan: 'Premium' },