🤖 Auto commit for release 'develop' on 2025-09-07

This commit is contained in:
JC5
2025-09-07 07:56:10 +02:00
parent 602df95f3c
commit 262f1bae34
93 changed files with 804 additions and 767 deletions

View File

@@ -68,21 +68,21 @@ class UnknownUserLoginAttempt extends Notification
;
}
// /**
// * @SuppressWarnings("PHPMD.UnusedFormalParameter")
// */
//
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// $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, 'ip' => $ip]));
//
// return $message;
// }
// /**
// * @SuppressWarnings("PHPMD.UnusedFormalParameter")
// */
//
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// $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, 'ip' => $ip]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -73,20 +73,20 @@ class UserInvitation extends Notification
;
}
// /**
// * @SuppressWarnings("PHPMD.UnusedFormalParameter")
// */
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// Log::debug('Now in toNtfy() for UserInvitation');
// $settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.invitation_created_subject'));
// $message->body((string) trans('email.invitation_created_body', ['email' => $this->invitee->user->email, 'invitee' => $this->invitee->email]));
//
// return $message;
// }
// /**
// * @SuppressWarnings("PHPMD.UnusedFormalParameter")
// */
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// Log::debug('Now in toNtfy() for UserInvitation');
// $settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.invitation_created_subject'));
// $message->body((string) trans('email.invitation_created_body', ['email' => $this->invitee->user->email, 'invitee' => $this->invitee->email]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -72,20 +72,20 @@ class UserRegistration extends Notification
;
}
// /**
// * @SuppressWarnings("PHPMD.UnusedFormalParameter")
// */
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// Log::debug('Now in toNtfy() for (Admin) UserRegistration');
// $settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.registered_subject_admin'));
// $message->body((string) trans('email.admin_new_user_registered', ['email' => $this->user->email, 'invitee' => $this->user->email]));
//
// return $message;
// }
// /**
// * @SuppressWarnings("PHPMD.UnusedFormalParameter")
// */
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// Log::debug('Now in toNtfy() for (Admin) UserRegistration');
// $settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.registered_subject_admin'));
// $message->body((string) trans('email.admin_new_user_registered', ['email' => $this->user->email, 'invitee' => $this->user->email]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -64,20 +64,20 @@ class VersionCheckResult extends Notification
;
}
// /**
// * @SuppressWarnings("PHPMD.UnusedFormalParameter")
// */
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// Log::debug('Now in toNtfy() for VersionCheckResult');
// $settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.new_version_email_subject'));
// $message->body($this->message);
//
// return $message;
// }
// /**
// * @SuppressWarnings("PHPMD.UnusedFormalParameter")
// */
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// Log::debug('Now in toNtfy() for VersionCheckResult');
// $settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.new_version_email_subject'));
// $message->body($this->message);
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -28,7 +28,8 @@ use FireflyIII\Support\Notifications\UrlValidator;
use FireflyIII\User;
use Illuminate\Support\Facades\Log;
use NotificationChannels\Pushover\PushoverChannel;
//use Wijourdil\NtfyNotificationChannel\Channels\NtfyChannel;
// use Wijourdil\NtfyNotificationChannel\Channels\NtfyChannel;
class ReturnsAvailableChannels
{
@@ -58,16 +59,16 @@ class ReturnsAvailableChannels
}
}
// if (true === config('notifications.channels.ntfy.enabled', false)) {
// // validate presence of of Ntfy settings.
// if ('' !== (string) app('fireflyconfig')->getEncrypted('ntfy_topic', '')->data) {
// Log::debug('Enabled ntfy.');
// $channels[] = NtfyChannel::class;
// }
// if ('' === (string) app('fireflyconfig')->getEncrypted('ntfy_topic', '')->data) {
// Log::warning('No topic name for Ntfy, channel is disabled.');
// }
// }
// if (true === config('notifications.channels.ntfy.enabled', false)) {
// // validate presence of of Ntfy settings.
// if ('' !== (string) app('fireflyconfig')->getEncrypted('ntfy_topic', '')->data) {
// Log::debug('Enabled ntfy.');
// $channels[] = NtfyChannel::class;
// }
// if ('' === (string) app('fireflyconfig')->getEncrypted('ntfy_topic', '')->data) {
// Log::warning('No topic name for Ntfy, channel is disabled.');
// }
// }
// pushover
if (true === config('notifications.channels.pushover.enabled', false)) {
@@ -99,17 +100,17 @@ class ReturnsAvailableChannels
}
}
// // validate presence of of Ntfy settings.
// if (true === config('notifications.channels.nfy.enabled', false)) {
// $ntfyTopic = (string) app('preferences')->getEncryptedForUser($user, 'ntfy_topic', '')->data;
// if ('' !== $ntfyTopic) {
// Log::debug(sprintf('Enabled ntfy, "%s"', $ntfyTopic));
// $channels[] = NtfyChannel::class;
// }
// if ('' === (string) app('preferences')->getEncryptedForUser($user, 'ntfy_topic', '')->data) {
// Log::warning('No topic name for Ntfy, channel is disabled.');
// }
// }
// // validate presence of of Ntfy settings.
// if (true === config('notifications.channels.nfy.enabled', false)) {
// $ntfyTopic = (string) app('preferences')->getEncryptedForUser($user, 'ntfy_topic', '')->data;
// if ('' !== $ntfyTopic) {
// Log::debug(sprintf('Enabled ntfy, "%s"', $ntfyTopic));
// $channels[] = NtfyChannel::class;
// }
// if ('' === (string) app('preferences')->getEncryptedForUser($user, 'ntfy_topic', '')->data) {
// Log::warning('No topic name for Ntfy, channel is disabled.');
// }
// }
// pushover
if (true === config('notifications.channels.slack.enabled', false)) {

View File

@@ -65,16 +65,16 @@ class DisabledMFANotification extends Notification
return new MailMessage()->markdown('emails.security.disabled-mfa', ['user' => $this->user, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])->subject($subject);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.disabled_mfa_subject'));
// $message->body((string) trans('email.disabled_mfa_slack', ['email' => $this->user->email]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.disabled_mfa_subject'));
// $message->body((string) trans('email.disabled_mfa_slack', ['email' => $this->user->email]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -65,16 +65,16 @@ class EnabledMFANotification extends Notification
return new MailMessage()->markdown('emails.security.enabled-mfa', ['user' => $this->user, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])->subject($subject);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.enabled_mfa_subject'));
// $message->body((string) trans('email.enabled_mfa_slack', ['email' => $this->user->email]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.enabled_mfa_subject'));
// $message->body((string) trans('email.enabled_mfa_slack', ['email' => $this->user->email]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -65,16 +65,16 @@ class MFABackupFewLeftNotification extends Notification
return new MailMessage()->markdown('emails.security.few-backup-codes', ['user' => $this->user, 'count' => $this->count, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])->subject($subject);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.mfa_few_backups_left_subject'));
// $message->body((string) trans('email.mfa_few_backups_left_slack', ['email' => $this->user->email, 'count' => $this->count]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.mfa_few_backups_left_subject'));
// $message->body((string) trans('email.mfa_few_backups_left_slack', ['email' => $this->user->email, 'count' => $this->count]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -65,16 +65,16 @@ class MFABackupNoLeftNotification extends Notification
return new MailMessage()->markdown('emails.security.no-backup-codes', ['user' => $this->user, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])->subject($subject);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.mfa_no_backups_left_subject'));
// $message->body((string) trans('email.mfa_no_backups_left_slack', ['email' => $this->user->email]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.mfa_no_backups_left_subject'));
// $message->body((string) trans('email.mfa_no_backups_left_slack', ['email' => $this->user->email]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -62,16 +62,16 @@ class MFAManyFailedAttemptsNotification extends Notification
return new MailMessage()->markdown('emails.security.many-failed-attempts', ['user' => $this->user, 'count' => $this->count, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])->subject($subject);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.mfa_many_failed_subject'));
// $message->body((string) trans('email.mfa_many_failed_slack', ['email' => $this->user->email, 'count' => $this->count]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.mfa_many_failed_subject'));
// $message->body((string) trans('email.mfa_many_failed_slack', ['email' => $this->user->email, 'count' => $this->count]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -65,16 +65,16 @@ class MFAUsedBackupCodeNotification extends Notification
return new MailMessage()->markdown('emails.security.used-backup-code', ['user' => $this->user, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])->subject($subject);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.used_backup_code_subject'));
// $message->body((string) trans('email.used_backup_code_slack', ['email' => $this->user->email]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.used_backup_code_subject'));
// $message->body((string) trans('email.used_backup_code_slack', ['email' => $this->user->email]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -65,16 +65,16 @@ class NewBackupCodesNotification extends Notification
return new MailMessage()->markdown('emails.security.new-backup-codes', ['user' => $this->user, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])->subject($subject);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.new_backup_codes_subject'));
// $message->body((string) trans('email.new_backup_codes_slack', ['email' => $this->user->email]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.new_backup_codes_subject'));
// $message->body((string) trans('email.new_backup_codes_slack', ['email' => $this->user->email]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -63,17 +63,17 @@ class UserFailedLoginAttempt extends Notification
return new MailMessage()->markdown('emails.security.failed-login', ['user' => $this->user, 'ip' => $ip, 'host' => $host, 'userAgent' => $userAgent, 'time' => $time])->subject($subject);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $ip = Request::ip();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.failed_login_subject'));
// $message->body((string) trans('email.failed_login_message', ['ip' => $ip, 'email' => $this->user->email]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $ip = Request::ip();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.failed_login_subject'));
// $message->body((string) trans('email.failed_login_message', ['ip' => $ip, 'email' => $this->user->email]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -49,20 +49,20 @@ class OwnerTestNotificationNtfy extends Notification
];
}
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.admin_test_subject'));
// $message->body((string) trans('email.admin_test_message', ['channel' => 'ntfy']));
// $message->tags(['white_check_mark']);
//
// return $message;
// }
// public function toNtfy(OwnerNotifiable $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'owner', null);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.admin_test_subject'));
// $message->body((string) trans('email.admin_test_message', ['channel' => 'ntfy']));
// $message->tags(['white_check_mark']);
//
// return $message;
// }
// public function via(OwnerNotifiable $notifiable): array
// {
// return [NtfyChannel::class];
// }
// public function via(OwnerNotifiable $notifiable): array
// {
// return [NtfyChannel::class];
// }
}

View File

@@ -49,20 +49,20 @@ class UserTestNotificationNtfy extends Notification
];
}
// public function toNtfy(User $user): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $user);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.admin_test_subject'));
// $message->body((string) trans('email.admin_test_message', ['channel' => 'ntfy']));
// $message->tags(['white_check_mark']);
//
// return $message;
// }
// public function toNtfy(User $user): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $user);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.admin_test_subject'));
// $message->body((string) trans('email.admin_test_message', ['channel' => 'ntfy']));
// $message->tags(['white_check_mark']);
//
// return $message;
// }
// public function via(User $user): array
// {
// return [NtfyChannel::class];
// }
// public function via(User $user): array
// {
// return [NtfyChannel::class];
// }
}

View File

@@ -73,16 +73,16 @@ class BillReminder extends Notification
return (string) trans(sprintf('email.bill_warning_subject_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]);
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title($this->getSubject());
// $message->body((string) trans('email.bill_warning_please_action'));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title($this->getSubject());
// $message->body((string) trans('email.bill_warning_please_action'));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -68,16 +68,16 @@ class NewAccessToken extends Notification
;
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.access_token_created_subject'));
// $message->body((string) trans('email.access_token_created_body'));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->title((string) trans('email.access_token_created_subject'));
// $message->body((string) trans('email.access_token_created_body'));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -65,15 +65,15 @@ class RuleActionFailed extends Notification
];
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->body($this->message);
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->body($this->message);
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -65,18 +65,18 @@ class UserLogin extends Notification
;
}
// public function toNtfy(User $notifiable): Message
// {
// $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]));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $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]));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")

View File

@@ -70,15 +70,15 @@ class UserNewPassword extends Notification
;
}
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->body((string) trans('email.reset_pw_message'));
//
// return $message;
// }
// public function toNtfy(User $notifiable): Message
// {
// $settings = ReturnsSettings::getSettings('ntfy', 'user', $notifiable);
// $message = new Message();
// $message->topic($settings['ntfy_topic']);
// $message->body((string) trans('email.reset_pw_message'));
//
// return $message;
// }
/**
* @SuppressWarnings("PHPMD.UnusedFormalParameter")