new(whatsapp.gblib): Native provider works in groups now.
This commit is contained in:
parent
2d787485e6
commit
39a881e61e
1 changed files with 12 additions and 12 deletions
|
@ -181,7 +181,6 @@ export class WhatsappDirectLine extends GBService {
|
||||||
// While handling other bots uses boot instance of this class to send QR Codes.
|
// While handling other bots uses boot instance of this class to send QR Codes.
|
||||||
|
|
||||||
const s = new DialogKeywords(this.min, null, null, null);
|
const s = new DialogKeywords(this.min, null, null, null);
|
||||||
if (minBoot.botId !== this.botId) {
|
|
||||||
const qrBuf = await s.getQRCode(qr);
|
const qrBuf = await s.getQRCode(qr);
|
||||||
const gbaiName = `${this.min.botId}.gbai`;
|
const gbaiName = `${this.min.botId}.gbai`;
|
||||||
const localName = Path.join('work', gbaiName, 'cache', `qr${GBAdminService.getRndReadableIdentifier()}.png`);
|
const localName = Path.join('work', gbaiName, 'cache', `qr${GBAdminService.getRndReadableIdentifier()}.png`);
|
||||||
|
@ -192,12 +191,13 @@ export class WhatsappDirectLine extends GBService {
|
||||||
'cache',
|
'cache',
|
||||||
Path.basename(localName)
|
Path.basename(localName)
|
||||||
);
|
);
|
||||||
|
if (minBoot.botId !== this.botId) {
|
||||||
GBServer.globals.minBoot.whatsAppDirectLine.sendFileToDevice(adminNumber, url, Path.basename(localName), msg);
|
GBServer.globals.minBoot.whatsAppDirectLine.sendFileToDevice(adminNumber, url, Path.basename(localName), msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The e-mail is sent to all bots.
|
// The e-mail is sent to all bots.
|
||||||
|
|
||||||
const html = `<P>${url}</P><IMG src=${url}/>`
|
const html = `<P>${msg}</P><IMG src=${url}/>`
|
||||||
await s.sendEmail(adminEmail, `Check your WhatsApp for bot ${this.botId}`, html);
|
await s.sendEmail(adminEmail, `Check your WhatsApp for bot ${this.botId}`, html);
|
||||||
|
|
||||||
}).bind(this));
|
}).bind(this));
|
||||||
|
|
Loading…
Add table
Reference in a new issue