mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 11:52:20 -06:00
Escutar a configuração do webhook para midias recebidas
This commit is contained in:
@@ -34,6 +34,7 @@ export class ChannelStartupService {
|
||||
public readonly localChatwoot: wa.LocalChatwoot = {};
|
||||
public readonly localProxy: wa.LocalProxy = {};
|
||||
public readonly localSettings: wa.LocalSettings = {};
|
||||
public readonly localWebhook: wa.LocalWebHook = {};
|
||||
|
||||
public chatwootService = new ChatwootService(
|
||||
waMonitor,
|
||||
@@ -124,6 +125,17 @@ export class ChannelStartupService {
|
||||
return this.instance.wuid;
|
||||
}
|
||||
|
||||
public async loadWebhook() {
|
||||
const data = await this.prismaRepository.webhook.findUnique({
|
||||
where: {
|
||||
instanceId: this.instanceId,
|
||||
},
|
||||
});
|
||||
|
||||
this.localWebhook.enabled = data?.enabled;
|
||||
this.localWebhook.webhookBase64 = data?.webhookBase64;
|
||||
}
|
||||
|
||||
public async loadSettings() {
|
||||
const data = await this.prismaRepository.setting.findUnique({
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user