Renamed Msg91Flow to Msg91
This commit is contained in:
parent
b5b5abdc82
commit
817524de4b
3 changed files with 6 additions and 3 deletions
|
@ -27,6 +27,7 @@ use Appwrite\Auth\Phone\Mock;
|
||||||
use Appwrite\Auth\Phone\Telesign;
|
use Appwrite\Auth\Phone\Telesign;
|
||||||
use Appwrite\Auth\Phone\TextMagic;
|
use Appwrite\Auth\Phone\TextMagic;
|
||||||
use Appwrite\Auth\Phone\Twilio;
|
use Appwrite\Auth\Phone\Twilio;
|
||||||
|
use Appwrite\Auth\Phone\Msg91;
|
||||||
use Appwrite\DSN\DSN;
|
use Appwrite\DSN\DSN;
|
||||||
use Appwrite\Event\Audit;
|
use Appwrite\Event\Audit;
|
||||||
use Appwrite\Event\Database as EventDatabase;
|
use Appwrite\Event\Database as EventDatabase;
|
||||||
|
@ -990,6 +991,7 @@ App::setResource('phone', function () {
|
||||||
'twilio' => new Twilio($user, $secret),
|
'twilio' => new Twilio($user, $secret),
|
||||||
'text-magic' => new TextMagic($user, $secret),
|
'text-magic' => new TextMagic($user, $secret),
|
||||||
'telesign' => new Telesign($user, $secret),
|
'telesign' => new Telesign($user, $secret),
|
||||||
|
'msg91' => new Msg91($user, $secret),
|
||||||
default => null
|
default => null
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -5,6 +5,7 @@ use Appwrite\Auth\Phone\Mock;
|
||||||
use Appwrite\Auth\Phone\Telesign;
|
use Appwrite\Auth\Phone\Telesign;
|
||||||
use Appwrite\Auth\Phone\TextMagic;
|
use Appwrite\Auth\Phone\TextMagic;
|
||||||
use Appwrite\Auth\Phone\Twilio;
|
use Appwrite\Auth\Phone\Twilio;
|
||||||
|
use Appwrite\Auth\Phone\Msg91;
|
||||||
use Appwrite\DSN\DSN;
|
use Appwrite\DSN\DSN;
|
||||||
use Appwrite\Resque\Worker;
|
use Appwrite\Resque\Worker;
|
||||||
use Utopia\App;
|
use Utopia\App;
|
||||||
|
@ -36,7 +37,7 @@ class MessagingV1 extends Worker
|
||||||
'twilio' => new Twilio($user, $secret),
|
'twilio' => new Twilio($user, $secret),
|
||||||
'text-magic' => new TextMagic($user, $secret),
|
'text-magic' => new TextMagic($user, $secret),
|
||||||
'telesign' => new Telesign($user, $secret),
|
'telesign' => new Telesign($user, $secret),
|
||||||
'msg91' => new Msg91Flow($user, $secret),
|
'msg91' => new Msg91($user, $secret),
|
||||||
default => null
|
default => null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ use Appwrite\Auth\Phone;
|
||||||
// Reference Material
|
// Reference Material
|
||||||
// https://docs.msg91.com/p/tf9GTextN/e/Irz7-x1PK/MSG91
|
// https://docs.msg91.com/p/tf9GTextN/e/Irz7-x1PK/MSG91
|
||||||
|
|
||||||
class Msg91Flow extends Phone
|
class Msg91 extends Phone
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
|
@ -30,7 +30,7 @@ class Msg91Flow extends Phone
|
||||||
$to = ltrim($to, '+');
|
$to = ltrim($to, '+');
|
||||||
$this->request(
|
$this->request(
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: $this->endpoint . '/messages',
|
url: $this->endpoint,
|
||||||
payload: \http_build_query([
|
payload: \http_build_query([
|
||||||
'sender' => $this->user,
|
'sender' => $this->user,
|
||||||
'otp' => $message,
|
'otp' => $message,
|
Loading…
Reference in a new issue