mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 22:22:32 +01:00
Disabled support for queues
This commit is contained in:
parent
50a77846c3
commit
87eb9e1216
@ -292,7 +292,7 @@ if (!defined('APP_NAME'))
|
|||||||
define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com'));
|
define('NINJA_APP_URL', env('NINJA_APP_URL', 'https://app.invoiceninja.com'));
|
||||||
define('NINJA_DOCS_URL', env('NINJA_DOCS_URL', 'http://docs.invoiceninja.com/en/latest'));
|
define('NINJA_DOCS_URL', env('NINJA_DOCS_URL', 'http://docs.invoiceninja.com/en/latest'));
|
||||||
define('NINJA_DATE', '2000-01-01');
|
define('NINJA_DATE', '2000-01-01');
|
||||||
define('NINJA_VERSION', '3.0.0' . env('NINJA_VERSION_SUFFIX'));
|
define('NINJA_VERSION', '3.0.1' . env('NINJA_VERSION_SUFFIX'));
|
||||||
|
|
||||||
define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'));
|
define('SOCIAL_LINK_FACEBOOK', env('SOCIAL_LINK_FACEBOOK', 'https://www.facebook.com/invoiceninja'));
|
||||||
define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja'));
|
define('SOCIAL_LINK_TWITTER', env('SOCIAL_LINK_TWITTER', 'https://twitter.com/invoiceninja'));
|
||||||
|
@ -185,9 +185,11 @@ class InvoiceApiController extends BaseAPIController
|
|||||||
|
|
||||||
if ($isEmailInvoice) {
|
if ($isEmailInvoice) {
|
||||||
if ($payment) {
|
if ($payment) {
|
||||||
$this->dispatch(new SendPaymentEmail($payment));
|
app('App\Ninja\Mailers\ContactMailer')->sendPaymentConfirmation($payment);
|
||||||
|
//$this->dispatch(new SendPaymentEmail($payment));
|
||||||
} elseif ( ! $invoice->is_recurring) {
|
} elseif ( ! $invoice->is_recurring) {
|
||||||
$this->dispatch(new SendInvoiceEmail($invoice));
|
app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||||
|
//$this->dispatch(new SendInvoiceEmail($invoice));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -415,8 +415,9 @@ class InvoiceController extends BaseController
|
|||||||
if ($invoice->is_recurring) {
|
if ($invoice->is_recurring) {
|
||||||
$response = $this->emailRecurringInvoice($invoice);
|
$response = $this->emailRecurringInvoice($invoice);
|
||||||
} else {
|
} else {
|
||||||
$this->dispatch(new SendInvoiceEmail($invoice, false, $pdfUpload));
|
return app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice, false, $pdfUpload);
|
||||||
return true;
|
//$this->dispatch(new SendInvoiceEmail($invoice, false, $pdfUpload));
|
||||||
|
//return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($response === true) {
|
if ($response === true) {
|
||||||
@ -446,8 +447,9 @@ class InvoiceController extends BaseController
|
|||||||
if ($invoice->isPaid()) {
|
if ($invoice->isPaid()) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
$this->dispatch(new SendInvoiceEmail($invoice));
|
return app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||||
return true;
|
//$this->dispatch(new SendInvoiceEmail($invoice));
|
||||||
|
//return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,20 +1,46 @@
|
|||||||
<?php namespace App\Listeners;
|
<?php namespace App\Listeners;
|
||||||
|
|
||||||
|
use App\Ninja\Mailers\UserMailer;
|
||||||
|
use App\Ninja\Mailers\ContactMailer;
|
||||||
use App\Events\InvoiceWasEmailed;
|
use App\Events\InvoiceWasEmailed;
|
||||||
use App\Events\QuoteWasEmailed;
|
use App\Events\QuoteWasEmailed;
|
||||||
use App\Events\InvoiceInvitationWasViewed;
|
use App\Events\InvoiceInvitationWasViewed;
|
||||||
use App\Events\QuoteInvitationWasViewed;
|
use App\Events\QuoteInvitationWasViewed;
|
||||||
use App\Events\QuoteInvitationWasApproved;
|
use App\Events\QuoteInvitationWasApproved;
|
||||||
use App\Events\PaymentWasCreated;
|
use App\Events\PaymentWasCreated;
|
||||||
use App\Jobs\SendPaymentEmail;
|
use App\Services\PushService;
|
||||||
use App\Jobs\SendNotificationEmail;
|
|
||||||
use App\Jobs\SendPushNotification;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class NotificationListener
|
* Class NotificationListener
|
||||||
*/
|
*/
|
||||||
class NotificationListener
|
class NotificationListener
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var UserMailer
|
||||||
|
*/
|
||||||
|
protected $userMailer;
|
||||||
|
/**
|
||||||
|
* @var ContactMailer
|
||||||
|
*/
|
||||||
|
protected $contactMailer;
|
||||||
|
/**
|
||||||
|
* @var PushService
|
||||||
|
*/
|
||||||
|
protected $pushService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NotificationListener constructor.
|
||||||
|
* @param UserMailer $userMailer
|
||||||
|
* @param ContactMailer $contactMailer
|
||||||
|
* @param PushService $pushService
|
||||||
|
*/
|
||||||
|
public function __construct(UserMailer $userMailer, ContactMailer $contactMailer, PushService $pushService)
|
||||||
|
{
|
||||||
|
$this->userMailer = $userMailer;
|
||||||
|
$this->contactMailer = $contactMailer;
|
||||||
|
$this->pushService = $pushService;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $invoice
|
* @param $invoice
|
||||||
* @param $type
|
* @param $type
|
||||||
@ -26,7 +52,7 @@ class NotificationListener
|
|||||||
{
|
{
|
||||||
if ($user->{"notify_{$type}"})
|
if ($user->{"notify_{$type}"})
|
||||||
{
|
{
|
||||||
dispatch(new SendNotificationEmail($user, $invoice, $type, $payment));
|
$this->userMailer->sendNotification($user, $invoice, $type, $payment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -37,7 +63,7 @@ class NotificationListener
|
|||||||
public function emailedInvoice(InvoiceWasEmailed $event)
|
public function emailedInvoice(InvoiceWasEmailed $event)
|
||||||
{
|
{
|
||||||
$this->sendEmails($event->invoice, 'sent');
|
$this->sendEmails($event->invoice, 'sent');
|
||||||
dispatch(new SendPushNotification($event->invoice, 'sent'));
|
$this->pushService->sendNotification($event->invoice, 'sent');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -46,7 +72,7 @@ class NotificationListener
|
|||||||
public function emailedQuote(QuoteWasEmailed $event)
|
public function emailedQuote(QuoteWasEmailed $event)
|
||||||
{
|
{
|
||||||
$this->sendEmails($event->quote, 'sent');
|
$this->sendEmails($event->quote, 'sent');
|
||||||
dispatch(new SendPushNotification($event->quote, 'sent'));
|
$this->pushService->sendNotification($event->quote, 'sent');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -59,7 +85,7 @@ class NotificationListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->sendEmails($event->invoice, 'viewed');
|
$this->sendEmails($event->invoice, 'viewed');
|
||||||
dispatch(new SendPushNotification($event->invoice, 'viewed'));
|
$this->pushService->sendNotification($event->invoice, 'viewed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -72,7 +98,7 @@ class NotificationListener
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->sendEmails($event->quote, 'viewed');
|
$this->sendEmails($event->quote, 'viewed');
|
||||||
dispatch(new SendPushNotification($event->quote, 'viewed'));
|
$this->pushService->sendNotification($event->quote, 'viewed');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -81,7 +107,7 @@ class NotificationListener
|
|||||||
public function approvedQuote(QuoteInvitationWasApproved $event)
|
public function approvedQuote(QuoteInvitationWasApproved $event)
|
||||||
{
|
{
|
||||||
$this->sendEmails($event->quote, 'approved');
|
$this->sendEmails($event->quote, 'approved');
|
||||||
dispatch(new SendPushNotification($event->quote, 'approved'));
|
$this->pushService->sendNotification($event->quote, 'approved');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,9 +120,10 @@ class NotificationListener
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$this->contactMailer->sendPaymentConfirmation($event->payment);
|
||||||
$this->sendEmails($event->payment->invoice, 'paid', $event->payment);
|
$this->sendEmails($event->payment->invoice, 'paid', $event->payment);
|
||||||
dispatch(new SendPaymentEmail($event->payment));
|
|
||||||
dispatch(new SendPushNotification($event->payment->invoice, 'paid'));
|
$this->pushService->sendNotification($event->payment->invoice, 'paid');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -756,7 +756,8 @@ class InvoiceRepository extends BaseRepository
|
|||||||
*/
|
*/
|
||||||
public function emailInvoice(Invoice $invoice)
|
public function emailInvoice(Invoice $invoice)
|
||||||
{
|
{
|
||||||
dispatch(new SendInvoiceEmail($invoice));
|
app('App\Ninja\Mailers\ContactMailer')->sendInvoice($invoice);
|
||||||
|
//dispatch(new SendInvoiceEmail($invoice));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user