review changes
This commit is contained in:
parent
db9e7b0199
commit
e4d2d15f70
2 changed files with 13 additions and 6 deletions
|
@ -1679,6 +1679,7 @@ App::post('/v1/messaging/messages/sms')
|
|||
'providerInternalId' => $provider->getInternalId(),
|
||||
'to' => $to,
|
||||
'description' => $description,
|
||||
'deliveryTime' => $deliveryTime,
|
||||
'data' => [
|
||||
'content' => $content,
|
||||
],
|
||||
|
@ -1789,6 +1790,7 @@ App::post('/v1/messaging/messages/push')
|
|||
'providerInternalId' => $provider->getInternalId(),
|
||||
'to' => $to,
|
||||
'description' => $description,
|
||||
'deliveryTime' => $deliveryTime,
|
||||
'data' => $pushData,
|
||||
'status' => $status,
|
||||
'search' => $messageId . ' ' . $description . ' ' . $title . ' ' . $providerId,
|
||||
|
@ -1945,6 +1947,10 @@ App::patch('/v1/messaging/messages/email/:messageId')
|
|||
$message->setAttribute('status', $status);
|
||||
}
|
||||
|
||||
if (!is_null($deliveryTime)) {
|
||||
$message->setAttribute('deliveryTime', $deliveryTime);
|
||||
}
|
||||
|
||||
$message = $dbForProject->updateDocument('messages', $message->getId(), $message);
|
||||
|
||||
if ($status === 'processing') {
|
||||
|
@ -2024,6 +2030,10 @@ App::patch('/v1/messaging/messages/sms/:messageId')
|
|||
$message->setAttribute('description', $description);
|
||||
}
|
||||
|
||||
if (!is_null($deliveryTime)) {
|
||||
$message->setAttribute('deliveryTime', $deliveryTime);
|
||||
}
|
||||
|
||||
$message = $dbForProject->updateDocument('messages', $message->getId(), $message);
|
||||
|
||||
if ($status === 'processing') {
|
||||
|
@ -2142,6 +2152,9 @@ App::patch('/v1/messaging/messages/push/:messageId')
|
|||
$message->setAttribute('description', $description);
|
||||
}
|
||||
|
||||
if (!is_null($deliveryTime)) {
|
||||
$message->setAttribute('deliveryTime', $deliveryTime);
|
||||
}
|
||||
|
||||
$message = $dbForProject->updateDocument('messages', $message->getId(), $message);
|
||||
|
||||
|
|
|
@ -372,7 +372,6 @@ trait MessagingBase
|
|||
|
||||
public function testSendEmail()
|
||||
{
|
||||
|
||||
$to = App::getEnv('_APP_MESSAGE_EMAIL_PROVIDER_MAILGUN_RECEIVER_EMAIL');
|
||||
$from = App::getEnv('_APP_MESSAGE_EMAIL_PROVIDER_MAILGUN_FROM');
|
||||
$apiKey = App::getEnv('_APP_MESSAGE_EMAIL_PROVIDER_MAILGUN_API_KEY');
|
||||
|
@ -484,7 +483,6 @@ trait MessagingBase
|
|||
*/
|
||||
public function testUpdateEmail(array $email)
|
||||
{
|
||||
|
||||
$to = App::getEnv('_APP_MESSAGE_EMAIL_PROVIDER_MAILGUN_RECEIVER_EMAIL');
|
||||
$from = App::getEnv('_APP_MESSAGE_EMAIL_PROVIDER_MAILGUN_FROM');
|
||||
$apiKey = App::getEnv('_APP_MESSAGE_EMAIL_PROVIDER_MAILGUN_API_KEY');
|
||||
|
@ -611,7 +609,6 @@ trait MessagingBase
|
|||
|
||||
public function testSendSMS()
|
||||
{
|
||||
|
||||
$to = App::getEnv('_APP_MESSAGE_SMS_PROVIDER_MSG91_TO');
|
||||
$from = App::getEnv('_APP_MESSAGE_SMS_PROVIDER_MSG91_FROM');
|
||||
$senderId = App::getEnv('_APP_MESSAGE_SMS_PROVIDER_MSG91_SENDER_ID');
|
||||
|
@ -720,7 +717,6 @@ trait MessagingBase
|
|||
*/
|
||||
public function testUpdateSMS(array $sms)
|
||||
{
|
||||
|
||||
$to = App::getEnv('_APP_MESSAGE_SMS_PROVIDER_MSG91_TO');
|
||||
$from = App::getEnv('_APP_MESSAGE_SMS_PROVIDER_MSG91_FROM');
|
||||
$senderId = App::getEnv('_APP_MESSAGE_SMS_PROVIDER_MSG91_SENDER_ID');
|
||||
|
@ -844,7 +840,6 @@ trait MessagingBase
|
|||
|
||||
public function testSendPushNotification()
|
||||
{
|
||||
|
||||
$to = App::getEnv('_APP_MESSAGE_PUSH_PROVIDER_FCM_RECEIVER_TOKEN');
|
||||
$serverKey = App::getEnv('_APP_MESSAGE_PUSH_PROVIDER_FCM_SERVERY_KEY');
|
||||
if (empty($to) || empty($serverKey)) {
|
||||
|
@ -950,7 +945,6 @@ trait MessagingBase
|
|||
*/
|
||||
public function testUpdatePushNotification(array $push)
|
||||
{
|
||||
|
||||
$to = App::getEnv('_APP_MESSAGE_PUSH_PROVIDER_FCM_RECEIVER_TOKEN');
|
||||
$serverKey = App::getEnv('_APP_MESSAGE_PUSH_PROVIDER_FCM_SERVERY_KEY');
|
||||
if (empty($to) || empty($serverKey)) {
|
||||
|
|
Loading…
Reference in a new issue