From: Aki Tuomi Date: Mon, 3 Feb 2020 08:59:45 +0000 (+0200) Subject: plugins: push-notification: Only emit event if something was triggered X-Git-Tag: 2.3.10~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad311a891b962272cb34b1aba6f8fbbf7a7bae7b;p=thirdparty%2Fdovecot%2Fcore.git plugins: push-notification: Only emit event if something was triggered Otherwise events would be sent from non-push transactions, such as mail searches. --- 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 */