Wire up settings in mailer job

This commit is contained in:
David Bomba 2021-02-16 22:19:07 +11:00
parent 648e6b3252
commit 58a1e2812d
3 changed files with 6 additions and 2 deletions

View File

@ -50,6 +50,8 @@ class GmailTransport extends Transport
{
/*We should nest the token in the message and then discard it as needed*/
nlog("inside gmail sender with token {$this->token}");
$this->beforeSendPerformed($message);
$this->gmail->using($this->token);

View File

@ -105,6 +105,8 @@ class NinjaMailerJob implements ShouldQueue
$user = User::find($this->decodePrimaryKey($sending_user));
nlog("Sending via {$user->present()->name()}");
$google = (new Google())->init();
$google->getClient()->setAccessToken(json_encode($user->oauth_user_token));

View File

@ -76,8 +76,8 @@ class InvitationViewedListener implements ShouldQueue
if (isset($invitation->company->slack_webhook_url)) {
$notification->method = ['slack'];
Notification::route('slack', $invitation->company->slack_webhook_url)
->notify($notification);
// Notification::route('slack', $invitation->company->slack_webhook_url)
// ->notify($notification);
}
}
}