Deploy: 2026-06-24 14:41:57
This commit is contained in:
@@ -74,15 +74,10 @@ async function startSession(session_key, webhook_url) {
|
||||
|
||||
client.on('qr', async (qr) => {
|
||||
console.log(`[QR] Generated for ${session_key}`);
|
||||
const QRCode = require('qrcode');
|
||||
QRCode.toDataURL(qr, async (err, url) => {
|
||||
if (!err) {
|
||||
await sendWebhook(webhook_url, {
|
||||
session_key,
|
||||
state: 'waiting_qr',
|
||||
qr_code: url
|
||||
});
|
||||
}
|
||||
await sendWebhook(webhook_url, {
|
||||
session_key,
|
||||
state: 'waiting_qr',
|
||||
qr_code: qr
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user