1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00

Renamed Msg91Flow to Msg91

This commit is contained in:
Dineshkumar 2022-07-09 19:34:57 +05:30
parent b5b5abdc82
commit 817524de4b
3 changed files with 6 additions and 3 deletions

View file

@ -27,6 +27,7 @@ use Appwrite\Auth\Phone\Mock;
use Appwrite\Auth\Phone\Telesign;
use Appwrite\Auth\Phone\TextMagic;
use Appwrite\Auth\Phone\Twilio;
use Appwrite\Auth\Phone\Msg91;
use Appwrite\DSN\DSN;
use Appwrite\Event\Audit;
use Appwrite\Event\Database as EventDatabase;
@ -990,6 +991,7 @@ App::setResource('phone', function () {
'twilio' => new Twilio($user, $secret),
'text-magic' => new TextMagic($user, $secret),
'telesign' => new Telesign($user, $secret),
'msg91' => new Msg91($user, $secret),
default => null
};
});

View file

@ -5,6 +5,7 @@ use Appwrite\Auth\Phone\Mock;
use Appwrite\Auth\Phone\Telesign;
use Appwrite\Auth\Phone\TextMagic;
use Appwrite\Auth\Phone\Twilio;
use Appwrite\Auth\Phone\Msg91;
use Appwrite\DSN\DSN;
use Appwrite\Resque\Worker;
use Utopia\App;
@ -36,7 +37,7 @@ class MessagingV1 extends Worker
'twilio' => new Twilio($user, $secret),
'text-magic' => new TextMagic($user, $secret),
'telesign' => new Telesign($user, $secret),
'msg91' => new Msg91Flow($user, $secret),
'msg91' => new Msg91($user, $secret),
default => null
};

View file

@ -7,7 +7,7 @@ use Appwrite\Auth\Phone;
// Reference Material
// https://docs.msg91.com/p/tf9GTextN/e/Irz7-x1PK/MSG91
class Msg91Flow extends Phone
class Msg91 extends Phone
{
/**
* @var string
@ -30,7 +30,7 @@ class Msg91Flow extends Phone
$to = ltrim($to, '+');
$this->request(
method: 'POST',
url: $this->endpoint . '/messages',
url: $this->endpoint,
payload: \http_build_query([
'sender' => $this->user,
'otp' => $message,