mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add IP to failed login message.
This commit is contained in:
@@ -80,9 +80,10 @@ class UnknownUserLoginAttempt extends Notification
|
||||
{
|
||||
$settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
|
||||
$message = new Message();
|
||||
$ip = Request::ip();
|
||||
$message->topic($settings['ntfy_topic']);
|
||||
$message->title((string) trans('email.unknown_user_subject'));
|
||||
$message->body((string) trans('email.unknown_user_message', ['address' => $this->address]));
|
||||
$message->body((string) trans('email.unknown_user_message', ['address' => $this->address, 'ip' =>$ip]));
|
||||
|
||||
return $message;
|
||||
}
|
||||
@@ -92,7 +93,9 @@ class UnknownUserLoginAttempt extends Notification
|
||||
*/
|
||||
public function toPushover(OwnerNotifiable $notifiable): PushoverMessage
|
||||
{
|
||||
return PushoverMessage::create((string) trans('email.unknown_user_message', ['address' => $this->address]))
|
||||
$ip = Request::ip();
|
||||
|
||||
return PushoverMessage::create((string) trans('email.unknown_user_message', ['address' => $this->address, 'ip' =>$ip]))
|
||||
->title((string) trans('email.unknown_user_subject'))
|
||||
;
|
||||
}
|
||||
@@ -102,8 +105,9 @@ class UnknownUserLoginAttempt extends Notification
|
||||
*/
|
||||
public function toSlack(OwnerNotifiable $notifiable): SlackMessage
|
||||
{
|
||||
$ip = Request::ip();
|
||||
return new SlackMessage()->content(
|
||||
(string) trans('email.unknown_user_body', ['address' => $this->address])
|
||||
(string) trans('email.unknown_user_body', ['address' => $this->address, 'ip' => $ip])
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user