new(whatsapp.gblib): New WhatsApp provider: Meta.
This commit is contained in:
parent
23265ce488
commit
3cf8f8d138
1 changed files with 8 additions and 1 deletions
|
@ -445,8 +445,15 @@ export class GBMinService {
|
|||
GBServer.globals.server.all(`/${min.instance.botId}/whatsapp`, async (req, res) => {
|
||||
|
||||
if (req.query['hub.mode'] === 'subscribe') {
|
||||
GBLogEx.info(min, `Meta callback OK.`);
|
||||
const val = req.query['hub.challenge'];
|
||||
res.send(val);
|
||||
|
||||
if (val === process.env.META_CHALLENGE) {
|
||||
res.status(200);
|
||||
} else {
|
||||
res.status(401);
|
||||
}
|
||||
res.end();
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue