mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-21 11:37:23 -06:00
feat: webhook base64 option
This commit is contained in:
parent
547943a05c
commit
e26ae30f6f
@ -97,7 +97,6 @@ WEBHOOK:
|
||||
WEBHOOK_BY_EVENTS: false
|
||||
# Automatically maps webhook paths
|
||||
# Set the events you want to hear
|
||||
WEBHOOK_BASE64: false
|
||||
EVENTS:
|
||||
APPLICATION_STARTUP: false
|
||||
QRCODE_UPDATED: true
|
||||
|
@ -279,7 +279,6 @@ export class WAStartupService {
|
||||
this.localWebhook.webhook_base64 = data?.webhook_base64;
|
||||
this.logger.verbose(`Webhook by webhook_base64: ${this.localWebhook.webhook_base64}`);
|
||||
|
||||
|
||||
this.logger.verbose('Webhook loaded');
|
||||
}
|
||||
|
||||
@ -1533,8 +1532,11 @@ export class WAStartupService {
|
||||
}
|
||||
|
||||
let messageRaw: MessageRaw;
|
||||
const globalWebhook = this.configService.get<Webhook>('WEBHOOK').GLOBAL;
|
||||
if (this.localWebhook.webhook_base64 === true && received?.message.documentMessage || received?.message.imageMessage ) {
|
||||
|
||||
if (
|
||||
(this.localWebhook.webhook_base64 === true && received?.message.documentMessage) ||
|
||||
received?.message.imageMessage
|
||||
) {
|
||||
const buffer = await downloadMediaMessage(
|
||||
{ key: received.key, message: received?.message },
|
||||
'buffer',
|
||||
|
Loading…
Reference in New Issue
Block a user