chore: Displayed WhatsApp API provider name in inbox settings (#5346)
This commit is contained in:
@@ -16,6 +16,9 @@ export default {
|
||||
channelType() {
|
||||
return this.inbox.channel_type;
|
||||
},
|
||||
whatsAppAPIProvider() {
|
||||
return this.inbox.provider || '';
|
||||
},
|
||||
isAPIInbox() {
|
||||
return this.channelType === INBOX_TYPES.API;
|
||||
},
|
||||
@@ -47,10 +50,22 @@ export default {
|
||||
isASmsInbox() {
|
||||
return this.channelType === INBOX_TYPES.SMS || this.isATwilioSMSChannel;
|
||||
},
|
||||
isATwilioWhatsappChannel() {
|
||||
isATwilioWhatsAppChannel() {
|
||||
const { medium: medium = '' } = this.inbox;
|
||||
return this.isATwilioChannel && medium === 'whatsapp';
|
||||
},
|
||||
isAWhatsAppCloudChannel() {
|
||||
return (
|
||||
this.channelType === INBOX_TYPES.WHATSAPP &&
|
||||
this.whatsAppAPIProvider === 'whatsapp_cloud'
|
||||
);
|
||||
},
|
||||
is360DialogWhatsAppChannel() {
|
||||
return (
|
||||
this.channelType === INBOX_TYPES.WHATSAPP &&
|
||||
this.whatsAppAPIProvider === 'default'
|
||||
);
|
||||
},
|
||||
chatAdditionalAttributes() {
|
||||
const { additional_attributes: additionalAttributes } = this.chat || {};
|
||||
return additionalAttributes || {};
|
||||
@@ -75,15 +90,15 @@ export default {
|
||||
badgeKey = this.facebookBadge;
|
||||
} else if (this.isATwilioChannel) {
|
||||
badgeKey = this.twilioBadge;
|
||||
} else if (this.isAWhatsappChannel) {
|
||||
} else if (this.isAWhatsAppChannel) {
|
||||
badgeKey = 'whatsapp';
|
||||
}
|
||||
return badgeKey || this.channelType;
|
||||
},
|
||||
isAWhatsappChannel() {
|
||||
isAWhatsAppChannel() {
|
||||
return (
|
||||
this.channelType === INBOX_TYPES.WHATSAPP ||
|
||||
this.isATwilioWhatsappChannel
|
||||
this.isATwilioWhatsAppChannel
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user