]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
plugins: push-notification: Only emit event if something was triggered
authorAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 3 Feb 2020 08:59:45 +0000 (10:59 +0200)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 6 Feb 2020 12:18:41 +0000 (12:18 +0000)
Otherwise events would be sent from non-push transactions, such
as mail searches.

src/plugins/push-notification/push-notification-plugin.c

index 878809dac8ed443fa7641cf6f6377779236a6b67..2cea08cdd0ba9af4c3d33a410c5b4ffb770e23d1 100644 (file)
@@ -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 */