Browse Source

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
lets-bump-hometown-to-mastodon-4.2
nachtjasmin 3 years ago
parent
commit
6947207a30
No known key found for this signature in database
  1. 1
      app/javascript/mastodon/features/notifications/components/report.jsx
  2. 1
      app/javascript/mastodon/features/report/category.jsx
  3. 1
      app/models/report.rb

1
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 {

1
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;

1
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

Loading…
Cancel
Save