From 6947207a30c37bb4f6e208e335eb84a41aaa97ab Mon Sep 17 00:00:00 2001 From: nachtjasmin Date: Sat, 8 Jul 2023 17:28:57 +0200 Subject: [PATCH] Add missing numeric value for "dislike" category This is diverging behaviour from upstream and was fixed by me in [1] already. It is working fine on queer.group and therefore now going to be merged into this fork. [1]: https://github.com/hometown-fork/hometown/pull/1321 --- .../mastodon/features/notifications/components/report.jsx | 1 + app/javascript/mastodon/features/report/category.jsx | 1 + app/models/report.rb | 1 + 3 files changed, 3 insertions(+) diff --git a/app/javascript/mastodon/features/notifications/components/report.jsx b/app/javascript/mastodon/features/notifications/components/report.jsx index cb50b62cd..28b23d772 100644 --- a/app/javascript/mastodon/features/notifications/components/report.jsx +++ b/app/javascript/mastodon/features/notifications/components/report.jsx @@ -15,6 +15,7 @@ const messages = defineMessages({ spam: { id: 'report_notification.categories.spam', defaultMessage: 'Spam' }, legal: { id: 'report_notification.categories.legal', defaultMessage: 'Legal' }, violation: { id: 'report_notification.categories.violation', defaultMessage: 'Rule violation' }, + dislike: { id: 'report_notification.categories.dislike', defaultMessage: 'Dislike' }, }); class Report extends ImmutablePureComponent { diff --git a/app/javascript/mastodon/features/report/category.jsx b/app/javascript/mastodon/features/report/category.jsx index b7288334b..56e347ad1 100644 --- a/app/javascript/mastodon/features/report/category.jsx +++ b/app/javascript/mastodon/features/report/category.jsx @@ -45,6 +45,7 @@ class Category extends PureComponent { const { onNextStep, category } = this.props; switch(category) { + // Hometown: also send reports for "disliked" toots, it's quite unfair to do nothing in this case. case 'dislike': onNextStep('statuses'); break; diff --git a/app/models/report.rb b/app/models/report.rb index eaf662d1e..b8d06a39a 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -57,6 +57,7 @@ class Report < ApplicationRecord spam: 1_000, legal: 1_500, violation: 2_000, + dislike: 3_000, } before_validation :set_uri, only: :create