updated providerType wherever left to update
This commit is contained in:
parent
fa8dc133b4
commit
739cc36fdc
3 changed files with 44 additions and 42 deletions
|
@ -1315,7 +1315,7 @@ App::post('/v1/account/sessions/phone')
|
||||||
$target = Authorization::skip(fn() => $dbForProject->createDocument('targets', new Document([
|
$target = Authorization::skip(fn() => $dbForProject->createDocument('targets', new Document([
|
||||||
'userId' => $user->getId(),
|
'userId' => $user->getId(),
|
||||||
'userInternalId' => $user->getInternalId(),
|
'userInternalId' => $user->getInternalId(),
|
||||||
'providerType' => 'sms',
|
'providerType' => MESSAGE_TYPE_SMS,
|
||||||
'identifier' => $phone,
|
'identifier' => $phone,
|
||||||
])));
|
])));
|
||||||
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $target]);
|
$user->setAttribute('targets', [...$user->getAttribute('targets', []), $target]);
|
||||||
|
@ -1374,7 +1374,7 @@ App::post('/v1/account/sessions/phone')
|
||||||
$queueForMessaging
|
$queueForMessaging
|
||||||
->setMessage($messageDoc)
|
->setMessage($messageDoc)
|
||||||
->setRecipients([$phone])
|
->setRecipients([$phone])
|
||||||
->setProviderType('SMS')
|
->setProviderType(MESSAGE_TYPE_SMS)
|
||||||
->setProject($project)
|
->setProject($project)
|
||||||
->trigger();
|
->trigger();
|
||||||
|
|
||||||
|
@ -3100,7 +3100,7 @@ App::post('/v1/account/verification/phone')
|
||||||
$queueForMessaging
|
$queueForMessaging
|
||||||
->setMessage($messageDoc)
|
->setMessage($messageDoc)
|
||||||
->setRecipients([$user->getAttribute('phone')])
|
->setRecipients([$user->getAttribute('phone')])
|
||||||
->setProviderType('SMS')
|
->setProviderType(MESSAGE_TYPE_SMS)
|
||||||
->setProject($project)
|
->setProject($project)
|
||||||
->trigger();
|
->trigger();
|
||||||
|
|
||||||
|
|
|
@ -609,10 +609,11 @@ Database::addFilter(
|
||||||
];
|
];
|
||||||
|
|
||||||
$data = \json_decode($message->getAttribute('data', []), true);
|
$data = \json_decode($message->getAttribute('data', []), true);
|
||||||
|
$providerType = $message->getAttribute('providerType', '');
|
||||||
|
|
||||||
if (\array_key_exists('subject', $data)) {
|
if ($providerType === MESSAGE_TYPE_EMAIL) {
|
||||||
$searchValues = \array_merge($searchValues, [$data['subject'], MESSAGE_TYPE_EMAIL]);
|
$searchValues = \array_merge($searchValues, [$data['subject'], MESSAGE_TYPE_EMAIL]);
|
||||||
} elseif (\array_key_exists('content', $data)) {
|
} elseif ($providerType === MESSAGE_TYPE_SMS) {
|
||||||
$searchValues = \array_merge($searchValues, [$data['content'], MESSAGE_TYPE_SMS]);
|
$searchValues = \array_merge($searchValues, [$data['content'], MESSAGE_TYPE_SMS]);
|
||||||
} else {
|
} else {
|
||||||
$searchValues = \array_merge($searchValues, [$data['title'], MESSAGE_TYPE_PUSH]);
|
$searchValues = \array_merge($searchValues, [$data['title'], MESSAGE_TYPE_PUSH]);
|
||||||
|
|
75
composer.lock
generated
75
composer.lock
generated
|
@ -156,11 +156,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "appwrite/php-runtimes",
|
"name": "appwrite/php-runtimes",
|
||||||
"version": "0.13.1",
|
"version": "0.13.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/runtimes.git",
|
"url": "https://github.com/appwrite/runtimes.git",
|
||||||
"reference": "b584d19cdcd82737d0ee5c34d23de791f5ed3610"
|
"reference": "214a37c2c66e0f2bc9c30fdfde66955d9fd084a1"
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0",
|
"php": ">=8.0",
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
"php",
|
"php",
|
||||||
"runtimes"
|
"runtimes"
|
||||||
],
|
],
|
||||||
"time": "2023-10-16T15:39:53+00:00"
|
"time": "2023-11-22T15:36:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "chillerlan/php-qrcode",
|
"name": "chillerlan/php-qrcode",
|
||||||
|
@ -1465,7 +1465,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/deprecation-contracts",
|
"name": "symfony/deprecation-contracts",
|
||||||
"version": "v3.3.0",
|
"version": "v3.4.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/deprecation-contracts.git",
|
"url": "https://github.com/symfony/deprecation-contracts.git",
|
||||||
|
@ -1512,7 +1512,7 @@
|
||||||
"description": "A generic function and convention to trigger deprecation notices",
|
"description": "A generic function and convention to trigger deprecation notices",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0"
|
"source": "https://github.com/symfony/deprecation-contracts/tree/v3.4.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -2217,16 +2217,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/logger",
|
"name": "utopia-php/logger",
|
||||||
"version": "0.3.1",
|
"version": "0.3.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/utopia-php/logger.git",
|
"url": "https://github.com/utopia-php/logger.git",
|
||||||
"reference": "de623f1ec1c672c795d113dd25c5bf212f7ef4fc"
|
"reference": "ba763c10688fe2ed715ad2bed3f13d18dfec6253"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/utopia-php/logger/zipball/de623f1ec1c672c795d113dd25c5bf212f7ef4fc",
|
"url": "https://api.github.com/repos/utopia-php/logger/zipball/ba763c10688fe2ed715ad2bed3f13d18dfec6253",
|
||||||
"reference": "de623f1ec1c672c795d113dd25c5bf212f7ef4fc",
|
"reference": "ba763c10688fe2ed715ad2bed3f13d18dfec6253",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -2264,9 +2264,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/utopia-php/logger/issues",
|
"issues": "https://github.com/utopia-php/logger/issues",
|
||||||
"source": "https://github.com/utopia-php/logger/tree/0.3.1"
|
"source": "https://github.com/utopia-php/logger/tree/0.3.2"
|
||||||
},
|
},
|
||||||
"time": "2023-02-10T15:52:50+00:00"
|
"time": "2023-11-22T14:45:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "utopia-php/messaging",
|
"name": "utopia-php/messaging",
|
||||||
|
@ -3136,16 +3136,16 @@
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
{
|
{
|
||||||
"name": "appwrite/sdk-generator",
|
"name": "appwrite/sdk-generator",
|
||||||
"version": "0.35.2",
|
"version": "0.35.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||||
"reference": "2dfe0430a64ffd2a07078d83b20144b871acac3b"
|
"reference": "4c431d5324a8f8cd2cab9a5515c170a5b427d44c"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/2dfe0430a64ffd2a07078d83b20144b871acac3b",
|
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/4c431d5324a8f8cd2cab9a5515c170a5b427d44c",
|
||||||
"reference": "2dfe0430a64ffd2a07078d83b20144b871acac3b",
|
"reference": "4c431d5324a8f8cd2cab9a5515c170a5b427d44c",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3181,9 +3181,9 @@
|
||||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||||
"source": "https://github.com/appwrite/sdk-generator/tree/0.35.2"
|
"source": "https://github.com/appwrite/sdk-generator/tree/0.35.3"
|
||||||
},
|
},
|
||||||
"time": "2023-09-14T14:59:50+00:00"
|
"time": "2023-11-12T05:56:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "doctrine/deprecations",
|
"name": "doctrine/deprecations",
|
||||||
|
@ -3890,16 +3890,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpstan/phpdoc-parser",
|
"name": "phpstan/phpdoc-parser",
|
||||||
"version": "1.24.2",
|
"version": "1.24.4",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
"url": "https://github.com/phpstan/phpdoc-parser.git",
|
||||||
"reference": "bcad8d995980440892759db0c32acae7c8e79442"
|
"reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/bcad8d995980440892759db0c32acae7c8e79442",
|
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496",
|
||||||
"reference": "bcad8d995980440892759db0c32acae7c8e79442",
|
"reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -3931,9 +3931,9 @@
|
||||||
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
"description": "PHPDoc parser with support for nullable, intersection and generic types",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
|
||||||
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.2"
|
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4"
|
||||||
},
|
},
|
||||||
"time": "2023-09-26T12:28:12+00:00"
|
"time": "2023-11-26T18:29:22+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "phpunit/php-code-coverage",
|
"name": "phpunit/php-code-coverage",
|
||||||
|
@ -5676,16 +5676,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "theseer/tokenizer",
|
"name": "theseer/tokenizer",
|
||||||
"version": "1.2.1",
|
"version": "1.2.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/theseer/tokenizer.git",
|
"url": "https://github.com/theseer/tokenizer.git",
|
||||||
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e"
|
"reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e",
|
"url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
|
||||||
"reference": "34a41e998c2183e22995f158c581e7b5e755ab9e",
|
"reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -5714,7 +5714,7 @@
|
||||||
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
|
"description": "A small library for converting tokenized PHP source code into XML and potentially other formats",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/theseer/tokenizer/issues",
|
"issues": "https://github.com/theseer/tokenizer/issues",
|
||||||
"source": "https://github.com/theseer/tokenizer/tree/1.2.1"
|
"source": "https://github.com/theseer/tokenizer/tree/1.2.2"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5722,30 +5722,31 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2021-07-28T10:34:58+00:00"
|
"time": "2023-11-20T00:12:19+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/twig",
|
"name": "twig/twig",
|
||||||
"version": "v3.7.1",
|
"version": "v3.8.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/twigphp/Twig.git",
|
"url": "https://github.com/twigphp/Twig.git",
|
||||||
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554"
|
"reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
|
"url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d",
|
||||||
"reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554",
|
"reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.2.5",
|
"php": ">=7.2.5",
|
||||||
"symfony/polyfill-ctype": "^1.8",
|
"symfony/polyfill-ctype": "^1.8",
|
||||||
"symfony/polyfill-mbstring": "^1.3"
|
"symfony/polyfill-mbstring": "^1.3",
|
||||||
|
"symfony/polyfill-php80": "^1.22"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"psr/container": "^1.0|^2.0",
|
"psr/container": "^1.0|^2.0",
|
||||||
"symfony/phpunit-bridge": "^5.4.9|^6.3"
|
"symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
@ -5781,7 +5782,7 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/twigphp/Twig/issues",
|
"issues": "https://github.com/twigphp/Twig/issues",
|
||||||
"source": "https://github.com/twigphp/Twig/tree/v3.7.1"
|
"source": "https://github.com/twigphp/Twig/tree/v3.8.0"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -5793,7 +5794,7 @@
|
||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2023-08-28T11:09:02+00:00"
|
"time": "2023-11-21T18:54:41+00:00"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
|
Loading…
Reference in a new issue