diff --git a/app/Services/StatusLabelService.php b/app/Services/StatusLabelService.php index 1e1ca4725..5c2aab954 100644 --- a/app/Services/StatusLabelService.php +++ b/app/Services/StatusLabelService.php @@ -3,31 +3,13 @@ namespace App\Services; use App\Status; -use Illuminate\Support\Facades\Cache; -use Illuminate\Support\Str; class StatusLabelService { - const CACHE_KEY = 'pf:services:status_label:_v0:'; - public static function get(Status $status) { - if (config('instance.label.covid.enabled') == false || ! $status) { - return [ - 'covid' => false, - ]; - } - - return Cache::remember(self::CACHE_KEY.$status->id, now()->addDays(7), function () use ($status) { - if (! $status->caption) { - return [ - 'covid' => false, - ]; - } - - return [ - 'covid' => Str::of(strtolower($status->caption))->contains(['covid', 'corona', 'coronavirus', 'vaccine', 'vaxx', 'vaccination', 'plandemic']), - ]; - }); + return [ + 'covid' => false, + ]; } } diff --git a/app/Util/Site/Config.php b/app/Util/Site/Config.php index f266793c1..c2a915db0 100644 --- a/app/Util/Site/Config.php +++ b/app/Util/Site/Config.php @@ -92,13 +92,6 @@ class Config 'mastodon' => false, 'pixelfed' => false, ], - 'label' => [ - 'covid' => [ - 'enabled' => (bool) config('instance.label.covid.enabled'), - 'org' => config('instance.label.covid.org'), - 'url' => config('instance.label.covid.url'), - ], - ], 'hls' => $hls, 'groups' => (bool) config('groups.enabled'), ], diff --git a/config/instance.php b/config/instance.php index 1719c5145..5066f4cca 100644 --- a/config/instance.php +++ b/config/instance.php @@ -83,14 +83,6 @@ return [ ], ], - 'label' => [ - 'covid' => [ - 'enabled' => env('ENABLE_COVID_LABEL', true), - 'url' => env('COVID_LABEL_URL', 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/advice-for-public'), - 'org' => env('COVID_LABEL_ORG', 'visit the WHO website'), - ], - ], - 'enable_cc' => env('ENABLE_CONFIG_CACHE', true), 'has_legal_notice' => env('INSTANCE_LEGAL_NOTICE', false), diff --git a/resources/assets/components/groups/partials/GroupStatus.vue b/resources/assets/components/groups/partials/GroupStatus.vue index fe61c892e..7c8dc1e0c 100644 --- a/resources/assets/components/groups/partials/GroupStatus.vue +++ b/resources/assets/components/groups/partials/GroupStatus.vue @@ -225,18 +225,6 @@ -
-

- - - For information about COVID-19, {{config.features.label.covid.org}} - - - - -

-
-

@@ -708,11 +696,6 @@ window.location.href = status.media_attachments[0].url; }, - labelRedirect(type) { - let url = '/i/redirect?url=' + encodeURI(this.config.features.label.covid.url); - window.location.href = url; - }, - likeStatus(status, event) { event.currentTarget.blur(); let count = status.favourites_count; diff --git a/resources/assets/js/components/partials/StatusCard.vue b/resources/assets/js/components/partials/StatusCard.vue index 1efa6e2eb..7ff42d1af 100644 --- a/resources/assets/js/components/partials/StatusCard.vue +++ b/resources/assets/js/components/partials/StatusCard.vue @@ -109,18 +109,6 @@
-
-

- - - For information about COVID-19, {{config.features.label.covid.org}} - - - - -

-
-

@@ -311,11 +299,6 @@ window.location.href = status.media_attachments[0].url; }, - labelRedirect(type) { - let url = '/i/redirect?url=' + encodeURI(this.config.features.label.covid.url); - window.location.href = url; - }, - likeStatus(status, event) { if($('body').hasClass('loggedIn') == false) { return; diff --git a/resources/views/admin/diagnostics/home.blade.php b/resources/views/admin/diagnostics/home.blade.php index 0bc6cc07a..a93a3fa94 100644 --- a/resources/views/admin/diagnostics/home.blade.php +++ b/resources/views/admin/diagnostics/home.blade.php @@ -604,21 +604,6 @@ OAUTH_PAT_ID "{{config_cache('instance.oauth.pat.id')}}" - - INSTANCE - ENABLE_COVID_LABEL - {{config_cache('instance.label.covid.enabled') ? '✅ true' : '❌ false' }} - - - INSTANCE - COVID_LABEL_URL - "{{config_cache('instance.label.covid.url')}}" - - - INSTANCE - COVID_LABEL_ORG - "{{config_cache('instance.label.covid.org')}}" - INSTANCE ENABLE_CONFIG_CACHE