Skip to content

Firefly III: a personal finances manager

Remove references to discord.

James Colec841fa3620be
diff --git a/app/Events/NewVersionAvailable.php b/app/Events/NewVersionAvailable.php
index db3626b490..5d08de0d71 100644
--- a/app/Events/NewVersionAvailable.php
+++ b/app/Events/NewVersionAvailable.php
@@ -25,6 +25,7 @@ declare(strict_types=1);
namespace FireflyIII\Events;
use Illuminate\Queue\SerializesModels;
+use Illuminate\Support\Facades\Log;
/**
* Class NewVersionAvailable
@@ -40,6 +41,7 @@ class NewVersionAvailable extends Event
*/
public function __construct(string $message)
{
+ Log::debug(__METHOD__);
$this->message = $message;
}
}
diff --git a/app/Http/Controllers/Admin/NotificationController.php b/app/Http/Controllers/Admin/NotificationController.php
index 429481333b..59b32d7fef 100644
--- a/app/Http/Controllers/Admin/NotificationController.php
+++ b/app/Http/Controllers/Admin/NotificationController.php
@@ -41,7 +41,6 @@ class NotificationController extends Controller
$subTitle = (string) trans('firefly.title_owner_notifications');
$subTitleIcon = 'envelope-o';
$slackUrl = app('fireflyconfig')->get('slack_webhook_url', '')->data;
- $discordUrl = app('fireflyconfig')->get('discord_webhook_url', '')->data;
$channels = config('notifications.channels');
@@ -54,7 +53,7 @@ class NotificationController extends Controller
}
- return view('admin.notifications.index', compact('title', 'subTitle', 'mainTitleIcon', 'subTitleIcon', 'channels', 'slackUrl', 'discordUrl', 'notifications'));
+ return view('admin.notifications.index', compact('title', 'subTitle', 'mainTitleIcon', 'subTitleIcon', 'channels', 'slackUrl', 'notifications'));
}
public function postIndex(NotificationRequest $request): RedirectResponse
@@ -69,15 +68,9 @@ class NotificationController extends Controller
if ('' === $all['slack_url']) {
app('fireflyconfig')->delete('slack_webhook_url');
}
- if ('' === $all['discord_url']) {
- app('fireflyconfig')->delete('discord_webhook_url');
- }
if ('' !== $all['slack_url']) {
app('fireflyconfig')->set('slack_webhook_url', $all['slack_url']);
}
- if ('' !== $all['discord_url']) {
- app('fireflyconfig')->set('discord_webhook_url', $all['discord_url']);
- }
session()->flash('success', (string) trans('firefly.notification_settings_saved'));
@@ -95,7 +88,6 @@ class NotificationController extends Controller
session()->flash('error', (string) trans('firefly.notification_test_failed', ['channel' => $channel]));
break;
case 'email':
- case 'discord':
case 'slack':
/** @var User $user */
$user = auth()->user();
diff --git a/app/Http/Requests/NotificationRequest.php b/app/Http/Requests/NotificationRequest.php
index e0a97ac5ce..09a2d93fe9 100644
--- a/app/Http/Requests/NotificationRequest.php
+++ b/app/Http/Requests/NotificationRequest.php
@@ -44,7 +44,6 @@ class NotificationRequest extends FormRequest
}
$return[$key] = $value;
}
- $return['discord_url'] = $this->convertString('discord_url');
$return['slack_url'] = $this->convertString('slack_url');
return $return;
}
@@ -55,7 +54,6 @@ class NotificationRequest extends FormRequest
public function rules(): array
{
$rules = [
- 'discord_url' => ['nullable', 'url', 'min:1', new IsValidDiscordUrl()],
'slack_url' => ['nullable', 'url', 'min:1', new IsValidSlackUrl()],
];
foreach (config('notifications.notifications.owner') as $key => $info) {
diff --git a/config/notifications.php b/config/notifications.php
index 1253567f8c..394ad38c32 100644
--- a/config/notifications.php
+++ b/config/notifications.php
@@ -24,7 +24,6 @@ return [
'channels' => [
'email' => ['enabled' => true, 'ui_configurable' => 0,],
'slack' => ['enabled' => true, 'ui_configurable' => 1,],
- 'discord' => ['enabled' => true, 'ui_configurable' => 1,],
'nfty' => ['enabled' => false, 'ui_configurable' => 0,],
'pushover' => ['enabled' => false, 'ui_configurable' => 0,],
'gotify' => ['enabled' => false, 'ui_configurable' => 0,],
diff --git a/resources/views/admin/notifications/index.twig b/resources/views/admin/notifications/index.twig
index 2b753f9330..d32fb3b610 100644
--- a/resources/views/admin/notifications/index.twig
+++ b/resources/views/admin/notifications/index.twig
@@ -25,7 +25,6 @@
{% endfor %}
<p style="margin-top:2em;">{{ 'channel_settings'|_ }}</p>
{{ ExpandedForm.text('slack_url', slackUrl, {'label' : 'slack_url_label'|_}) }}
- {{ ExpandedForm.text('discord_url', discordUrl, {'label' : 'discord_url_label'|_}) }}
</div>
<div class="box-footer">
<button type="submit" class="btn btn-success">