From ad311a891b962272cb34b1aba6f8fbbf7a7bae7b Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 3 Feb 2020 10:59:45 +0200 Subject: [PATCH] plugins: push-notification: Only emit event if something was triggered Otherwise events would be sent from non-push transactions, such as mail searches. --- src/plugins/push-notification/push-notification-plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/push-notification/push-notification-plugin.c b/src/plugins/push-notification/push-notification-plugin.c index 878809dac8..2cea08cdd0 100644 --- a/src/plugins/push-notification/push-notification-plugin.c +++ b/src/plugins/push-notification/push-notification-plugin.c @@ -113,7 +113,7 @@ push_notification_transaction_end(struct push_notification_txn *ptxn, } } - if (success) { + if (success && ptxn->trigger != 0) { struct event_passthrough *e = event_create_passthrough(ptxn->event)-> set_name(PUSH_NOTIFICATION_EVENT_FINISHED); /* Emit event */ -- 2.47.3