fix: Handle Instagram text and attachments as separate messages (#11315)
When we send text with attachments on Instagram, Instagram treats text and attachments as separate messages. However, Chatwoot keeps them as a single message. Since Instagram sends echo events for each message, this can create duplicate messages in Chatwoot. To prevent this, we will send text and attachments as separate messages. --------- Co-authored-by: Pranav <pranav@chatwoot.com>
This commit is contained in:
@@ -17,6 +17,9 @@ export default {
|
||||
hasFbConfigured() {
|
||||
return window.chatwootConfig?.fbAppId;
|
||||
},
|
||||
hasInstagramConfigured() {
|
||||
return window.chatwootConfig?.instagramAppId;
|
||||
},
|
||||
isActive() {
|
||||
const { key } = this.channel;
|
||||
if (Object.keys(this.enabledFeatures).length === 0) {
|
||||
@@ -33,7 +36,9 @@ export default {
|
||||
}
|
||||
|
||||
if (key === 'instagram') {
|
||||
return this.enabledFeatures.channel_instagram;
|
||||
return (
|
||||
this.enabledFeatures.channel_instagram && this.hasInstagramConfigured
|
||||
);
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user