Skip to content

Commit 14ea5d9

Browse files
Merge pull request #662 from drauber/cwId_missing
Add -cwId- when findByName
2 parents f5bd11f + 86b2999 commit 14ea5d9

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
@@ -735,7 +735,12 @@ export class ChatwootService {
735735
}
736736

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

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

0 commit comments

Comments
 (0)