mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Check more failure cases
This commit is contained in:
@@ -124,11 +124,21 @@ class Messaging extends Action
|
||||
$recipients = \array_merge($recipients, $targets);
|
||||
}
|
||||
|
||||
if (empty($recipients)) {
|
||||
Console::error('No valid recipients found.');
|
||||
return;
|
||||
}
|
||||
|
||||
$fallback = $dbForProject->findOne('providers', [
|
||||
Query::equal('enabled', [true]),
|
||||
Query::equal('type', [$recipients[0]->getAttribute('providerType')]),
|
||||
]);
|
||||
|
||||
if ($fallback === false) {
|
||||
Console::error('No fallback provider found.');
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @var array<string, array<string>> $identifiers
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user