fix(whatsapp.gblib): Fix in bot switching.

This commit is contained in:
Rodrigo Rodriguez 2023-09-03 16:03:22 -03:00
parent 929b36d578
commit 69cd2e0188

View file

@ -122,7 +122,7 @@ export class WhatsappDirectLine extends GBService {
const client = await new SwaggerClient({ const client = await new SwaggerClient({
spec: JSON.parse(Fs.readFileSync('directline-3.0.json', 'utf8')), spec: JSON.parse(Fs.readFileSync('directline-3.0.json', 'utf8')),
requestInterceptor: req => { requestInterceptor: req => {
req.headers['Authorization'] = `Bearer ${this.min.instance.webchatKey}`; req.headers['Authorization'] = `Bearer ${this.min.instance.whatsappBotKey}`;
} }
}); });
this.directLineClient = client; this.directLineClient = client;
@ -677,7 +677,7 @@ export class WhatsappDirectLine extends GBService {
} }
}); });
} catch (e) { } catch (e) {
GBLog.error(e); GBLog .error(e);
} }
} }