mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Auto commit for release 'branch-v6.2' on 2024-12-22
This commit is contained in:
@@ -68,7 +68,8 @@ class UnknownUserLoginAttempt extends Notification
|
||||
|
||||
return new MailMessage()
|
||||
->markdown('emails.owner.unknown-user', ['address' => $this->address, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])
|
||||
->subject((string) trans('email.unknown_user_subject'));
|
||||
->subject((string) trans('email.unknown_user_subject'))
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -91,7 +92,8 @@ class UnknownUserLoginAttempt extends Notification
|
||||
public function toPushover(OwnerNotifiable $notifiable): PushoverMessage
|
||||
{
|
||||
return PushoverMessage::create((string) trans('email.unknown_user_message', ['address' => $this->address]))
|
||||
->title((string) trans('email.unknown_user_subject'));
|
||||
->title((string) trans('email.unknown_user_subject'))
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -61,7 +61,7 @@ class DisabledMFANotification extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
$subject = (string) trans('email.disabled_mfa_subject');
|
||||
$subject = (string) trans('email.disabled_mfa_subject');
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
|
@@ -61,7 +61,7 @@ class EnabledMFANotification extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
$subject = (string) trans('email.enabled_mfa_subject');
|
||||
$subject = (string) trans('email.enabled_mfa_subject');
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
|
@@ -63,7 +63,7 @@ class MFABackupFewLeftNotification extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
$subject = (string) trans('email.mfa_few_backups_left_subject', ['count' => $this->count]);
|
||||
$subject = (string) trans('email.mfa_few_backups_left_subject', ['count' => $this->count]);
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
|
@@ -61,7 +61,7 @@ class MFABackupNoLeftNotification extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
$subject = (string) trans('email.mfa_no_backups_left_subject');
|
||||
$subject = (string) trans('email.mfa_no_backups_left_subject');
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
|
@@ -60,7 +60,7 @@ class MFAManyFailedAttemptsNotification extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
$subject = (string) trans('email.mfa_many_failed_subject', ['count' => $this->count]);
|
||||
$subject = (string) trans('email.mfa_many_failed_subject', ['count' => $this->count]);
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
|
@@ -61,7 +61,7 @@ class MFAUsedBackupCodeNotification extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
$subject = (string) trans('email.used_backup_code_subject');
|
||||
$subject = (string) trans('email.used_backup_code_subject');
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
|
@@ -61,7 +61,7 @@ class NewBackupCodesNotification extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
$subject = (string) trans('email.new_backup_codes_subject');
|
||||
$subject = (string) trans('email.new_backup_codes_subject');
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
|
@@ -58,7 +58,7 @@ class UserFailedLoginAttempt extends Notification
|
||||
*/
|
||||
public function toMail(User $notifiable)
|
||||
{
|
||||
$subject = (string) trans('email.failed_login_subject');
|
||||
$subject = (string) trans('email.failed_login_subject');
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$userAgent = Request::userAgent();
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Notifications\User;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Notifications\ReturnsAvailableChannels;
|
||||
use FireflyIII\Notifications\ReturnsSettings;
|
||||
use FireflyIII\Support\Facades\Steam;
|
||||
@@ -68,13 +67,13 @@ class UserLogin extends Notification
|
||||
|
||||
public function toNtfy(User $notifiable): Message
|
||||
{
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
$settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
|
||||
$message = new Message();
|
||||
$message->topic($settings['ntfy_topic']);
|
||||
$message->title((string) trans('email.login_from_new_ip'));
|
||||
$message->body((string) trans('email.slack_login_from_new_ip', ['ip' => $ip, 'host' => $host, ]));
|
||||
$message->body((string) trans('email.slack_login_from_new_ip', ['ip' => $ip, 'host' => $host]));
|
||||
|
||||
return $message;
|
||||
}
|
||||
@@ -84,9 +83,10 @@ class UserLogin extends Notification
|
||||
*/
|
||||
public function toPushover(User $notifiable): PushoverMessage
|
||||
{
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
return PushoverMessage::create((string) trans('email.slack_login_from_new_ip', ['ip' => $ip, 'host' => $host, ]))
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
|
||||
return PushoverMessage::create((string) trans('email.slack_login_from_new_ip', ['ip' => $ip, 'host' => $host]))
|
||||
->title((string) trans('email.login_from_new_ip'))
|
||||
;
|
||||
}
|
||||
@@ -96,9 +96,10 @@ class UserLogin extends Notification
|
||||
*/
|
||||
public function toSlack(User $notifiable)
|
||||
{
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
return new SlackMessage()->content((string) trans('email.slack_login_from_new_ip', ['ip' => $ip, 'host' => $host, ]));
|
||||
$ip = Request::ip();
|
||||
$host = Steam::getHostName($ip);
|
||||
|
||||
return new SlackMessage()->content((string) trans('email.slack_login_from_new_ip', ['ip' => $ip, 'host' => $host]));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -108,6 +109,4 @@ class UserLogin extends Notification
|
||||
{
|
||||
return ReturnsAvailableChannels::returnChannels('user', $notifiable);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user