Fixes for notifications

This commit is contained in:
David Bomba 2021-07-23 08:04:01 +10:00
parent dc3cf85e2c
commit da7e368d63
5 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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]);

View File

@ -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([