Skip to content

Commit

Permalink
fix: Only show login info once
Browse files Browse the repository at this point in the history
  • Loading branch information
robvanderleek committed Feb 15, 2024
1 parent 6cd60c3 commit 2775701
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/whatsapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ export async function waitForKey(message: string) {
}

export async function login(waitForWA = false) {
signale.info('In the WhatsApp mobile app go to "Settings > Connected Devices > ');
signale.info('Connect Device" and scan the QR code below');
if (!waitForWA) {
signale.info('In the WhatsApp mobile app go to "Settings > Connected Devices > ');
signale.info('Connect Device" and scan the QR code below');
}
const socket = await initWASocket();
socket.ev.on('connection.update', async (update) => {
const {connection, lastDisconnect} = update
Expand Down

0 comments on commit 2775701

Please sign in to comment.