mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix various code.
This commit is contained in:
@@ -39,7 +39,7 @@ class ReturnsAvailableChannels
|
||||
if ('owner' === $type) {
|
||||
return self::returnOwnerChannels();
|
||||
}
|
||||
if ('user' === $type && null !== $user) {
|
||||
if ('user' === $type && $user instanceof User) {
|
||||
return self::returnUserChannels($user);
|
||||
}
|
||||
|
||||
|
@@ -52,7 +52,7 @@ class ReturnsSettings
|
||||
'ntfy_pass' => '',
|
||||
|
||||
];
|
||||
if ('user' === $type && null !== $user) {
|
||||
if ('user' === $type && $user instanceof User) {
|
||||
$settings['ntfy_server'] = Preferences::getEncryptedForUser($user, 'ntfy_server', 'https://ntfy.sh')->data;
|
||||
$settings['ntfy_topic'] = Preferences::getEncryptedForUser($user, 'ntfy_topic', '')->data;
|
||||
$settings['ntfy_auth'] = '1' === Preferences::getForUser($user, 'ntfy_auth', false)->data;
|
||||
|
@@ -66,12 +66,11 @@ class BillReminder extends Notification
|
||||
|
||||
private function getSubject(): string
|
||||
{
|
||||
$message = (string) trans(sprintf('email.bill_warning_subject_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]);
|
||||
if (0 === $this->diff) {
|
||||
$message = (string) trans(sprintf('email.bill_warning_subject_now_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]);
|
||||
return (string) trans(sprintf('email.bill_warning_subject_now_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]);
|
||||
}
|
||||
|
||||
return $message;
|
||||
return (string) trans(sprintf('email.bill_warning_subject_%s', $this->field), ['diff' => $this->diff, 'name' => $this->bill->name]);
|
||||
}
|
||||
|
||||
public function toNtfy(User $notifiable): Message
|
||||
|
Reference in New Issue
Block a user