Skip to content

Commit f44ab0f

Browse files
committed
Update current inbox if exists
1 parent 1f12874 commit f44ab0f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,19 @@ export class ChatwootService {
216216
}
217217

218218
inboxId = inbox.id;
219+
const data = {
220+
type: 'api',
221+
webhook_url: webhookUrl,
222+
};
223+
await client.inboxes.update({
224+
id: inboxId,
225+
accountId: this.provider.account_id,
226+
data: {
227+
enable_auto_assignment: false,
228+
name: inboxName,
229+
channel: data as any,
230+
},
231+
});
219232
}
220233

221234
this.logger.verbose('find contact in chatwoot and create if not exists');

0 commit comments

Comments
 (0)