Skip to content

Commit

Permalink
Adds a line in the notification email to manage its subscriptions.
Browse files Browse the repository at this point in the history
Untill now a subscriber wasn't able to manage its subscription because
there was no link anywhere, so it was forced to unsubscribe and then
subscribe again.

Now the link is in the notification email, after 'Unsubscribe at'.

Related to cachethq#2887
  • Loading branch information
uxen-ab committed Jan 30, 2018
1 parent 1fec3e0 commit 5ae13fb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ public function toMail($notifiable)
->greeting(trans('notifications.component.status_update.mail.subject'))
->line($content)
->action(trans('notifications.component.status_update.mail.action'), cachet_route('status-page'))
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]))
//TODO: Translate the text below
->line('Manage your subscriptions at ' . cachet_route('subscribe.manage', $notifiable->verify_code));
}

/**
Expand Down
4 changes: 3 additions & 1 deletion app/Notifications/Incident/NewIncidentNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ public function toMail($notifiable)
->line($content)
->action(trans('notifications.incident.new.mail.action'), cachet_route('incident', [$this->incident]))
->line($this->incident->message)
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]))
//TODO: Translate the text below.
->line('Manage your subscriptions at '. cachet_route('subscribe.manage', $notifiable->verify_code));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ public function toMail($notifiable)
->line($content)
->action(trans('notifications.incident.update.mail.action'), cachet_route('incident', [$this->update->incident]))
->line($this->update->message)
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]));
->line(trans('cachet.subscriber.unsubscribe', ['link' => cachet_route('subscribe.unsubscribe', $notifiable->verify_code)]))
//TODO: Translate the text below
->line('Manage your subscriptions at ' . cachet_route('subscribe.manage', $notifiable->verify_code));

}

/**
Expand Down

0 comments on commit 5ae13fb

Please sign in to comment.