mirror of
https://github.com/RaspbianFrance/raspisms.git
synced 2025-04-20 16:37:48 +02:00
add support for phone status during sms sending
This commit is contained in:
parent
38d350dfc2
commit
22e5149193
2 changed files with 68 additions and 52 deletions
|
@ -625,8 +625,9 @@ use Monolog\Logger;
|
|||
$phones_subset = $users_mms_phones[$id_user] ?: $phones_subset;
|
||||
}
|
||||
|
||||
// Keep only phones with remaining volume and available status
|
||||
$remaining_volume_phones = array_filter($phones_subset, function ($phone) {
|
||||
return $phone['remaining_volume'] > 0;
|
||||
return $phone['remaining_volume'] > 0 && $phone['status'] == \models\Phone::STATUS_AVAILABLE;
|
||||
});
|
||||
$phones_subset = $remaining_volume_phones ?: $phones_subset;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue