Prevent sending notification twice

[MAILPOET-2131]
This commit is contained in:
Pavel Dohnal
2019-06-20 12:31:38 +02:00
committed by M. Shull
parent 4a53c541ad
commit b52b943c97
2 changed files with 6 additions and 4 deletions

View File

@ -177,7 +177,7 @@ class API {
}
}
if (!$skip_subscriber_notification) {
if (!$skip_subscriber_notification && ($subscriber->status === Subscriber::STATUS_SUBSCRIBED)) {
$this->sendSubscriberNotification($subscriber, $found_segments_ids);
}
@ -298,7 +298,7 @@ class API {
$this->_scheduleWelcomeNotification($new_subscriber, $list_ids);
}
if (!$skip_subscriber_notification) {
if (!$skip_subscriber_notification && ($new_subscriber->status === Subscriber::STATUS_SUBSCRIBED)) {
$this->sendSubscriberNotification($new_subscriber, $list_ids);
}
}