mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-08 20:22:42 +01:00
Disabled iOS push notifications by default
This commit is contained in:
parent
74343b710e
commit
38866ff6f0
@ -631,8 +631,7 @@ if (!defined('CONTACT_EMAIL')) {
|
|||||||
define('DEFAULT_API_PAGE_SIZE', 15);
|
define('DEFAULT_API_PAGE_SIZE', 15);
|
||||||
define('MAX_API_PAGE_SIZE', 100);
|
define('MAX_API_PAGE_SIZE', 100);
|
||||||
|
|
||||||
define('IOS_PRODUCTION_PUSH', env('IOS_PRODUCTION_PUSH', 'ninjaIOS'));
|
define('IOS_PUSH_CERTIFICATE', env('IOS_PUSH_CERTIFICATE', ''));
|
||||||
define('IOS_DEV_PUSH', env('IOS_DEV_PUSH', 'devNinjaIOS'));
|
|
||||||
|
|
||||||
define('TOKEN_BILLING_DISABLED', 1);
|
define('TOKEN_BILLING_DISABLED', 1);
|
||||||
define('TOKEN_BILLING_OPT_IN', 2);
|
define('TOKEN_BILLING_OPT_IN', 2);
|
||||||
|
@ -19,13 +19,12 @@ class PushFactory
|
|||||||
*
|
*
|
||||||
* Static variables defined in routes.php
|
* Static variables defined in routes.php
|
||||||
*
|
*
|
||||||
* IOS_PRODUCTION_PUSH
|
* IOS_PUSH_CERTIFICATE
|
||||||
* IOS_DEV_PUSH
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->certificate = IOS_DEV_PUSH;
|
$this->certificate = IOS_PUSH_CERTIFICATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -93,4 +92,4 @@ class PushFactory
|
|||||||
return $feedback->getFeedback();
|
return $feedback->getFeedback();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,10 @@ class PushService
|
|||||||
|
|
||||||
public function sendNotification($invoice, $type)
|
public function sendNotification($invoice, $type)
|
||||||
{
|
{
|
||||||
|
if (! IOS_PUSH_CERTIFICATE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//check user has registered for push notifications
|
//check user has registered for push notifications
|
||||||
if(!$this->checkDeviceExists($invoice->account))
|
if(!$this->checkDeviceExists($invoice->account))
|
||||||
return;
|
return;
|
||||||
@ -168,4 +172,4 @@ class PushService
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user