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
+2
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
};
});
+2 -1
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
};
@@ -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,