Skip to content

Commit 86b2999

Browse files
committed
Add -cwId- when findByName
1 parent dfb003f commit 86b2999

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/api/integrations/chatwoot/services/chatwoot.service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,12 @@ export class ChatwootService {
736736
}
737737

738738
this.logger.verbose('find inbox by name');
739-
const findByName = inbox.payload.find((inbox) => inbox.name === this.getClientCwConfig().name_inbox);
739+
let findByName = inbox.payload.find((inbox) => inbox.name === this.getClientCwConfig().name_inbox);
740+
741+
if (!findByName) {
742+
findByName = inbox.payload.find((inbox) => inbox.name === this.getClientCwConfig().name_inbox.split('-cwId-')[0]);
743+
}
744+
740745

741746
if (!findByName) {
742747
this.logger.warn('inbox not found');

0 commit comments

Comments
 (0)