new(whatsapp.gblib): Native provider works in groups now.
This commit is contained in:
parent
34414f65ac
commit
f0b996fd68
2 changed files with 18 additions and 14 deletions
|
@ -870,7 +870,7 @@ export class GBVMService extends GBService {
|
|||
}
|
||||
|
||||
} catch (error) {
|
||||
throw new Error(`BASIC ERROR: ${error.message ? error.message : error}\n Stack:${error.stack}`);
|
||||
throw new Error(`BASIC RUNTIME ERR: ${error.message ? error.message : error}\n Stack:${error.stack}`);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -181,6 +181,7 @@ export class WhatsappDirectLine extends GBService {
|
|||
// While handling other bots uses boot instance of this class to send QR Codes.
|
||||
|
||||
const s = new DialogKeywords(this.min, null, null, null);
|
||||
if (minBoot.botId !== this.botId) {
|
||||
const qrBuf = await s.getQRCode(qr);
|
||||
const gbaiName = `${this.min.botId}.gbai`;
|
||||
const localName = Path.join('work', gbaiName, 'cache', `qr${GBAdminService.getRndReadableIdentifier()}.png`);
|
||||
|
@ -192,6 +193,9 @@ export class WhatsappDirectLine extends GBService {
|
|||
Path.basename(localName)
|
||||
);
|
||||
GBServer.globals.minBoot.whatsAppDirectLine.sendFileToDevice(adminNumber, url, Path.basename(localName), msg);
|
||||
}
|
||||
|
||||
// The e-mail is sent to all bots.
|
||||
s.sendEmail(adminEmail, `Check your WhatsApp for bot ${this.botId}`, msg);
|
||||
|
||||
}).bind(this));
|
||||
|
|
Loading…
Add table
Reference in a new issue