1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

Merge branch 'update-auth-labels' of https://github.com/appwrite/appwrite into update-auth-labels

This commit is contained in:
Matej Bačo 2024-01-29 20:11:54 +00:00
commit a755d76f52
3 changed files with 5 additions and 4 deletions

2
.env
View file

@ -58,7 +58,7 @@ _APP_SMTP_USERNAME=
_APP_SMTP_PASSWORD=
_APP_SMS_PROVIDER=sms://username:password@mock
_APP_SMS_FROM=+123456789
_APP_SMS_DENY_LIST=
_APP_SMS_PROJECTS_DENY_LIST=
_APP_STORAGE_LIMIT=30000000
_APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_FUNCTIONS_SIZE_LIMIT=30000000

View file

@ -571,7 +571,7 @@ services:
- _APP_REDIS_PASS
- _APP_SMS_PROVIDER
- _APP_SMS_FROM
- _APP_SMS_DENY_LIST
- _APP_SMS_PROJECTS_DENY_LIST
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG

View file

@ -56,11 +56,12 @@ class Messaging extends Action
$payload = $message->getPayload() ?? [];
if (empty($payload['project'])) {
throw new Exception('Project not found', 500);
throw new Exception('Project not set in payload');
return;
}
Console::log($payload['project']['$id']);
$denyList = App::getEnv('_APP_SMS_DENY_LIST', '');
$denyList = App::getEnv('_APP_SMS_PROJECTS_DENY_LIST', '');
$denyList = explode(',', $denyList);
if (in_array($payload['project']['$id'], $denyList)) {
Console::error("Project is in the deny list. Skipping ...");