Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `README.md`:
  Upstream added some documentation in the README, but our README is pretty
  different and barebone.
  Kept our README.
This commit is contained in:
Claire
2021-10-14 22:14:26 +02:00
19 changed files with 417 additions and 464 deletions

View File

@ -41,6 +41,7 @@ module SettingsHelper
ka: 'ქართული',
kab: 'Taqbaylit',
kk: 'Қазақша',
kmr: 'Kurmancî',
kn: 'ಕನ್ನಡ',
ko: '한국어',
ku: 'سۆرانی',

View File

@ -5,6 +5,7 @@
url('~fonts/montserrat/Montserrat-Regular.woff') format('woff'),
url('~fonts/montserrat/Montserrat-Regular.ttf') format('truetype');
font-weight: 400;
font-display: swap;
font-style: normal;
}
@ -13,5 +14,6 @@
src: local('Montserrat Medium'),
url('~fonts/montserrat/Montserrat-Medium.ttf') format('truetype');
font-weight: 500;
font-display: swap;
font-style: normal;
}

View File

@ -6,5 +6,6 @@
url('~fonts/roboto-mono/robotomono-regular-webfont.ttf') format('truetype'),
url('~fonts/roboto-mono/robotomono-regular-webfont.svg#roboto_monoregular') format('svg');
font-weight: 400;
font-display: swap;
font-style: normal;
}

View File

@ -6,6 +6,7 @@
url('~fonts/roboto/roboto-italic-webfont.ttf') format('truetype'),
url('~fonts/roboto/roboto-italic-webfont.svg#roboto-italic-webfont') format('svg');
font-weight: normal;
font-display: swap;
font-style: italic;
}
@ -17,6 +18,7 @@
url('~fonts/roboto/roboto-bold-webfont.ttf') format('truetype'),
url('~fonts/roboto/roboto-bold-webfont.svg#roboto-bold-webfont') format('svg');
font-weight: bold;
font-display: swap;
font-style: normal;
}
@ -28,6 +30,7 @@
url('~fonts/roboto/roboto-medium-webfont.ttf') format('truetype'),
url('~fonts/roboto/roboto-medium-webfont.svg#roboto-medium-webfont') format('svg');
font-weight: 500;
font-display: swap;
font-style: normal;
}
@ -39,5 +42,6 @@
url('~fonts/roboto/roboto-regular-webfont.ttf') format('truetype'),
url('~fonts/roboto/roboto-regular-webfont.svg#roboto-regular-webfont') format('svg');
font-weight: normal;
font-display: swap;
font-style: normal;
}

View File

@ -164,8 +164,8 @@ class AccountStatusesCleanupPolicy < ApplicationRecord
def without_popular_scope
scope = Status.left_joins(:status_stat)
scope = scope.where('COALESCE(status_stats.reblogs_count, 0) <= ?', min_reblogs) unless min_reblogs.nil?
scope = scope.where('COALESCE(status_stats.favourites_count, 0) <= ?', min_favs) unless min_favs.nil?
scope = scope.where('COALESCE(status_stats.reblogs_count, 0) < ?', min_reblogs) unless min_reblogs.nil?
scope = scope.where('COALESCE(status_stats.favourites_count, 0) < ?', min_favs) unless min_favs.nil?
scope
end
end

View File

@ -1,7 +1,7 @@
# frozen_string_literal: true
class ReactionValidator < ActiveModel::Validator
SUPPORTED_EMOJIS = Oj.load(File.read(Rails.root.join('app', 'javascript', 'mastodon', 'features', 'emoji', 'emoji_map.json'))).keys.freeze
SUPPORTED_EMOJIS = Oj.load_file(Rails.root.join('app', 'javascript', 'mastodon', 'features', 'emoji', 'emoji_map.json').to_s).keys.freeze
LIMIT = 8