feat: pass JID on connect; extract startAccount() helper; poll 30s for new accounts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-29 11:44:54 +05:30
parent e8aaae4188
commit 952a0e9b49
5 changed files with 58 additions and 18 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ describe('createWhatsAppSession', () => {
const onStatus = jest.fn();
await createWhatsAppSession('acc_1', '/sessions/1', jest.fn(), jest.fn(), jest.fn(), undefined, undefined, onStatus);
await connectionUpdateHandler({ connection: 'open' });
expect(onStatus).toHaveBeenCalledWith('connected');
expect(onStatus).toHaveBeenCalledWith('connected', undefined);
});
it('calls onStatus with "disconnected" on non-logout close', async () => {