Don't fire component update emails if the status hasn't changed.

Fixes #2113
This commit is contained in:
James Brooks
2016-09-29 10:03:47 +01:00
parent 8ce7e5e82e
commit b40066b20e
2 changed files with 7 additions and 3 deletions

View File

@@ -59,6 +59,11 @@ class SendComponentUpdateEmailNotificationHandler
{
$component = $event->component;
// Don't email anything if the status hasn't changed.
if ($event->original_status === $event->new_status) {
return;
}
// First notify all global subscribers.
$globalSubscribers = $this->subscriber->isVerified()->isGlobal()->get();