Skip to content

Commit 51a05a9

Browse files
authored
Merge pull request #3695 from akto-api-security/hotfix/fix_get_active_gmail_webhook
Fixing query to get first active alert
2 parents 7f38296 + 3a72118 commit 51a05a9

File tree

1 file changed

+4
-1
lines changed
  • apps/testing/src/main/java/com/akto/testing

1 file changed

+4
-1
lines changed

apps/testing/src/main/java/com/akto/testing/Main.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,10 @@ public static void raiseMixpanelEvent(ObjectId summaryId, TestingRun testingRun,
10581058

10591059
// check for webhooks here
10601060
CustomWebhook customWebhook = CustomWebhooksDao.instance.findOne(
1061-
Filters.eq(CustomWebhook.WEBHOOK_TYPE, CustomWebhook.WebhookType.GMAIL.toString())
1061+
Filters.and(
1062+
Filters.eq(CustomWebhook.WEBHOOK_TYPE, CustomWebhook.WebhookType.GMAIL.toString()),
1063+
Filters.eq("activeStatus", CustomWebhook.ActiveStatus.ACTIVE.toString())
1064+
)
10621065
);
10631066

10641067
if(customWebhook != null && customWebhook.getActiveStatus().equals(CustomWebhook.ActiveStatus.ACTIVE)) {

0 commit comments

Comments
 (0)