fix: Old Instagram inbox warnings (#11318)

We have added warnings for existing Instagram messenger inboxes via
https://github.com/chatwoot/chatwoot/pull/11303. There is an issue with
finding the correct Instagram/messenger inbox. This PR will fixes that
issue.
This commit is contained in:
Muhsin Keloth
2025-04-16 16:30:32 +05:30
committed by GitHub
parent 5c00880857
commit c6d4bc5632
6 changed files with 37 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ export default {
isATwilioInbox() {
return this.currentInbox.channel_type === 'Channel::TwilioSms';
},
// Check if a facebook inbox that has the same instagram_id
// Check if a facebook inbox exists with the same instagram_id
hasDuplicateInstagramInbox() {
const instagramId = this.currentInbox.instagram_id;
const facebookInbox =

View File

@@ -210,15 +210,15 @@ export default {
instagramUnauthorized() {
return this.isAInstagramChannel && this.inbox.reauthorization_required;
},
// Check if a facebook inbox that has the same instagram_id
// Check if a instagram inbox exists with the same instagram_id
hasDuplicateInstagramInbox() {
const instagramId = this.inbox.instagram_id;
const facebookInbox =
this.$store.getters['inboxes/getFacebookInboxByInstagramId'](
const instagramInbox =
this.$store.getters['inboxes/getInstagramInboxByInstagramId'](
instagramId
);
return this.inbox.channel_type === INBOX_TYPES.FB && facebookInbox;
return this.inbox.channel_type === INBOX_TYPES.FB && instagramInbox;
},
microsoftUnauthorized() {
return this.isAMicrosoftInbox && this.inbox.reauthorization_required;