mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-04-22 06:10:05 +00:00
🤖 Auto commit for release 'develop' on 2026-03-13
This commit is contained in:
@@ -123,16 +123,17 @@ final class NotificationController extends Controller
|
||||
|
||||
return redirect(route('settings.notification.index'));
|
||||
}
|
||||
|
||||
/** @var int $lastNotification */
|
||||
$lastNotification = FireflyConfig::get('last_test_notification', 123)->data;
|
||||
if (time() - $lastNotification < 120) {
|
||||
if ((time() - $lastNotification) < 120) {
|
||||
session()->flash('error', (string) trans('firefly.test_rate_limited'));
|
||||
|
||||
return redirect(route('settings.notification.index'));
|
||||
}
|
||||
|
||||
$all = $request->all();
|
||||
$channel = $all['test_submit'] ?? '';
|
||||
$all = $request->all();
|
||||
$channel = $all['test_submit'] ?? '';
|
||||
|
||||
switch ($channel) {
|
||||
default:
|
||||
@@ -149,7 +150,8 @@ final class NotificationController extends Controller
|
||||
event(new OwnerTestsNotificationChannel($channel, $owner));
|
||||
session()->flash('success', (string) trans('firefly.notification_test_executed', ['channel' => $channel]));
|
||||
}
|
||||
FireflyConfig::set('last_test_notification',time());
|
||||
FireflyConfig::set('last_test_notification', time());
|
||||
|
||||
return redirect(route('settings.notification.index'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user