From 2ff7c5ac8e63d30cd93c79b03a4d1c65aaa41b5a Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 29 Jan 2024 20:07:17 +0000 Subject: [PATCH 1/2] chore: rename env variable --- .env | 2 +- docker-compose.yml | 2 +- src/Appwrite/Platform/Workers/Messaging.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index f36a8e69eb..31474bf0b6 100644 --- a/.env +++ b/.env @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index b6f654bd6a..395923681d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index 4fd6c26afc..dda96a01dc 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -61,7 +61,7 @@ class Messaging extends Action } 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 ..."); From 1e966d6b2ef1c6d3c3ce396cd49b8444aba10f69 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 29 Jan 2024 20:09:23 +0000 Subject: [PATCH 2/2] chore: rename env variable --- src/Appwrite/Platform/Workers/Messaging.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index dda96a01dc..bd4d9afede 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -56,7 +56,7 @@ class Messaging extends Action $payload = $message->getPayload() ?? []; if (empty($payload['project'])) { - Console::error('Project not found'); + throw new Exception('Project not set in payload'); return; }