Merge pull request #3445 from appwrite/fix-phone-worker

feat: fix messaging worker
This commit is contained in:
Torsten Dittmann 2022-06-28 15:45:11 +02:00 committed by GitHub
commit 97ec147e0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

2
.env
View file

@ -57,7 +57,7 @@ _APP_SMTP_SECURE=
_APP_SMTP_USERNAME=
_APP_SMTP_PASSWORD=
_APP_PHONE_PROVIDER=phone://mock
_APP_PHONE_FROM=
_APP_PHONE_FROM=+123456789
_APP_STORAGE_LIMIT=30000000
_APP_STORAGE_PREVIEW_LIMIT=20000000
_APP_FUNCTIONS_SIZE_LIMIT=30000000

View file

@ -38,6 +38,8 @@ class MessagingV1 extends Worker
'telesign' => new Telesign($user, $secret),
default => null
};
$this->from = App::getEnv('_APP_PHONE_FROM');
}
public function run(): void
@ -47,6 +49,11 @@ class MessagingV1 extends Worker
return;
}
if (empty($this->from)) {
Console::info('Skipped sms processing. No phone number has been set.');
return;
}
$recipient = $this->args['recipient'];
$message = $this->args['message'];