Fixes for notifications
This commit is contained in:
parent
dc3cf85e2c
commit
da7e368d63
5 changed files with 3 additions and 6 deletions
|
|
@ -193,8 +193,6 @@ class NinjaMailerJob implements ShouldQueue
|
|||
return $this->setMailDriver();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Now that our token is refreshed and valid we can boot the
|
||||
* mail driver at runtime and also set the token which will persist
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ class InvoiceEmailedNotification implements ShouldQueue
|
|||
$methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']);
|
||||
|
||||
/* If one of the methods is email then we fire the EntitySentMailer */
|
||||
if (($key = array_search('mail', $methods))) {
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo->to_user = $user;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ class InvoiceFailedEmailNotification
|
|||
|
||||
$methods = $this->findUserNotificationTypes($event->invitation, $company_user, 'invoice', ['all_notifications', 'invoice_sent', 'invoice_sent_all']);
|
||||
|
||||
if (($key = array_search('mail', $methods))) {
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
$nmo->to_user = $user;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ class QuoteCreatedNotification implements ShouldQueue
|
|||
$methods = $this->findUserNotificationTypes($quote->invitations()->first(), $company_user, 'quote', ['all_notifications', 'quote_created', 'quote_created_all']);
|
||||
|
||||
/* If one of the methods is email then we fire the EntitySentMailer */
|
||||
if (($key = array_search('mail', $methods))) {
|
||||
if (($key = array_search('mail', $methods)) !== false) {
|
||||
unset($methods[$key]);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ class CompanyTest extends TestCase
|
|||
$settings->invoice_design_id = '2';
|
||||
$settings->quote_design_id = '1';
|
||||
|
||||
nlog($settings);
|
||||
$company->settings = $settings;
|
||||
|
||||
$response = $this->withHeaders([
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue