From bfe042dc3eab0e5297ddad7ef57da0acbd775601 Mon Sep 17 00:00:00 2001 From: shimon Date: Tue, 30 Jan 2024 13:29:15 +0200 Subject: [PATCH] fix --- src/Appwrite/Platform/Workers/Messaging.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Messaging.php b/src/Appwrite/Platform/Workers/Messaging.php index e50e58013e..1f3e29c8d5 100644 --- a/src/Appwrite/Platform/Workers/Messaging.php +++ b/src/Appwrite/Platform/Workers/Messaging.php @@ -59,13 +59,17 @@ class Messaging extends Action { $payload = $message->getPayload() ?? []; + if (empty($payload)) { + throw new Exception('Missing payload'); + } + if (empty($payload['project'])) { throw new Exception('Project not set in payload'); } $project = new Document($payload['project'] ?? []); - Console::log($project->getId()); + Console::log('Project: ' . $project->getId()); $denyList = App::getEnv('_APP_SMS_PROJECTS_DENY_LIST', ''); $denyList = explode(',', $denyList);