mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 00:18:25 +00:00
Merge pull request #3445 from appwrite/fix-phone-worker
feat: fix messaging worker
This commit is contained in:
commit
97ec147e0b
2 changed files with 8 additions and 1 deletions
2
.env
2
.env
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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'];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue