- Prevents newsletters from being sent to trashed subscribers

- Updates unit tests
- Addresses #629
This commit is contained in:
Vlad
2016-10-21 13:55:47 -04:00
parent 2787998d32
commit 1ac288d286
4 changed files with 37 additions and 3 deletions

View File

@ -47,6 +47,7 @@ class SendingQueue {
// abort if execution limit is reached
CronHelper::enforceExecutionLimit($this->timer);
$found_subscribers = SubscriberModel::whereIn('id', $subscribers_to_process_ids)
->whereNull('deleted_at')
->findMany();
$found_subscribers_ids = array_map(function($subscriber) {
return $subscriber->id;