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:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user