1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00

Merge pull request #4918 from turbo124/v5-develop

Wire up settings in mailer job
This commit is contained in:
David Bomba 2021-02-16 22:19:36 +11:00 committed by GitHub
commit 1d7e3d0379
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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*/ /*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->beforeSendPerformed($message);
$this->gmail->using($this->token); $this->gmail->using($this->token);

View File

@ -105,6 +105,8 @@ class NinjaMailerJob implements ShouldQueue
$user = User::find($this->decodePrimaryKey($sending_user)); $user = User::find($this->decodePrimaryKey($sending_user));
nlog("Sending via {$user->present()->name()}");
$google = (new Google())->init(); $google = (new Google())->init();
$google->getClient()->setAccessToken(json_encode($user->oauth_user_token)); $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)) { if (isset($invitation->company->slack_webhook_url)) {
$notification->method = ['slack']; $notification->method = ['slack'];
Notification::route('slack', $invitation->company->slack_webhook_url) // Notification::route('slack', $invitation->company->slack_webhook_url)
->notify($notification); // ->notify($notification);
} }
} }
} }