File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/api/integrations/event/webhook Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,7 @@ export class WebhookController extends EventController implements EventControlle
6666 local,
6767 } : EmitData ) : Promise < void > {
6868 const instance = ( await this . get ( instanceName ) ) as wa . LocalWebHook ;
69-
70- if ( ! instance || ! instance ?. enabled ) {
71- return ;
72- }
69+
7370
7471 const webhookConfig = configService . get < Webhook > ( 'WEBHOOK' ) ;
7572 const webhookLocal = instance ?. events ;
@@ -82,14 +79,14 @@ export class WebhookController extends EventController implements EventControlle
8279 event,
8380 instance : instanceName ,
8481 data,
85- destination : instance ?. url ,
82+ destination : instance ?. url || ` ${ webhookConfig . GLOBAL . URL } / ${ transformedWe } ` ,
8683 date_time : dateTime ,
8784 sender,
8885 server_url : serverUrl ,
8986 apikey : apiKey ,
9087 } ;
9188
92- if ( local ) {
89+ if ( local && ! instance || ! instance ?. enabled ) {
9390 if ( Array . isArray ( webhookLocal ) && webhookLocal . includes ( we ) ) {
9491 let baseURL : string ;
9592
You can’t perform that action at this time.
0 commit comments