mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Clean up and fix notifications.
This commit is contained in:
@@ -88,7 +88,7 @@ class BillReminder extends Notification
|
||||
$bill = $this->bill;
|
||||
$url = route('bills.show', [$bill->id]);
|
||||
|
||||
return (new SlackMessage())
|
||||
return new SlackMessage()
|
||||
->warning()
|
||||
->attachment(static function ($attachment) use ($bill, $url): void {
|
||||
$attachment->title((string) trans('firefly.visit_bill', ['name' => $bill->name]), $url);
|
||||
|
||||
@@ -63,7 +63,7 @@ class NewAccessToken extends Notification
|
||||
*/
|
||||
public function toSlack(User $notifiable)
|
||||
{
|
||||
return (new SlackMessage())->content((string) trans('email.access_token_created_body'));
|
||||
return new SlackMessage()->content((string) trans('email.access_token_created_body'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -73,7 +73,7 @@ class RuleActionFailed extends Notification
|
||||
$ruleTitle = $this->ruleTitle;
|
||||
$ruleLink = $this->ruleLink;
|
||||
|
||||
return (new SlackMessage())->content($this->message)->attachment(static function ($attachment) use ($groupTitle, $groupLink): void {
|
||||
return new SlackMessage()->content($this->message)->attachment(static function ($attachment) use ($groupTitle, $groupLink): void {
|
||||
$attachment->title((string) trans('rules.inspect_transaction', ['title' => $groupTitle]), $groupLink);
|
||||
})->attachment(static function ($attachment) use ($ruleTitle, $ruleLink): void {
|
||||
$attachment->title((string) trans('rules.inspect_rule', ['title' => $ruleTitle]), $ruleLink);
|
||||
|
||||
@@ -94,7 +94,7 @@ class UserLogin extends Notification
|
||||
$host = $hostName;
|
||||
}
|
||||
|
||||
return (new SlackMessage())->content((string) trans('email.slack_login_from_new_ip', ['host' => $host, 'ip' => $this->ip]));
|
||||
return new SlackMessage()->content((string) trans('email.slack_login_from_new_ip', ['host' => $host, 'ip' => $this->ip]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user