From eefab4076e479926cb48f2d5ce3622338256c3f0 Mon Sep 17 00:00:00 2001 From: Krenair Date: Sat, 26 Jan 2013 12:14:36 +0000 Subject: [PATCH] Allow events to specify that they should notify the agent. For I617eedce Change-Id: I763db2f089e250c9f5486ed787ac71344e84abb7 --- controller/NotificationController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/controller/NotificationController.php b/controller/NotificationController.php index 5add1d086..e59553c86 100644 --- a/controller/NotificationController.php +++ b/controller/NotificationController.php @@ -246,8 +246,9 @@ class EchoNotificationController { } } - // Don't notify the person who made the edit, that's a bit silly. - if ( $event->getAgent() ) { + // Don't notify the person who made the edit unless the event extra says to do so, that's a bit silly. + $extra = $event->getExtra(); + if ( ( !isset( $extra['notifyAgent'] ) || !$extra['notifyAgent'] ) && $event->getAgent() ) { unset( $subscriptions[$event->getAgent()->getId()] ); }