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

rebase/4.0.0rc2
Claire 2022-01-07 19:51:47 +01:00
commit fca50e4b50
7 changed files with 682 additions and 695 deletions

View File

@ -123,7 +123,7 @@ group :test do
gem 'rspec-sidekiq', '~> 3.1'
gem 'simplecov', '~> 0.21', require: false
gem 'webmock', '~> 3.14'
gem 'rspec_junit_formatter', '~> 0.4'
gem 'rspec_junit_formatter', '~> 0.5'
end
group :development do
@ -135,8 +135,8 @@ group :development do
gem 'letter_opener', '~> 1.7'
gem 'letter_opener_web', '~> 2.0'
gem 'memory_profiler'
gem 'rubocop', '~> 1.23', require: false
gem 'rubocop-rails', '~> 2.12', require: false
gem 'rubocop', '~> 1.24', require: false
gem 'rubocop-rails', '~> 2.13', require: false
gem 'brakeman', '~> 5.2', require: false
gem 'bundler-audit', '~> 0.9', require: false

View File

@ -291,7 +291,7 @@ GEM
rainbow (>= 2.0.0)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
i18n-tasks (0.9.35)
i18n-tasks (0.9.37)
activesupport (>= 4.0.2)
ast (>= 2.1.0)
erubi
@ -319,18 +319,18 @@ GEM
rdf (~> 3.1)
jsonapi-renderer (0.2.2)
jwt (2.2.2)
kaminari (1.2.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.1)
kaminari-activerecord (= 1.2.1)
kaminari-core (= 1.2.1)
kaminari-actionview (1.2.1)
kaminari-actionview (= 1.2.2)
kaminari-activerecord (= 1.2.2)
kaminari-core (= 1.2.2)
kaminari-actionview (1.2.2)
actionview
kaminari-core (= 1.2.1)
kaminari-activerecord (1.2.1)
kaminari-core (= 1.2.2)
kaminari-activerecord (1.2.2)
activerecord
kaminari-core (= 1.2.1)
kaminari-core (1.2.1)
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
kt-paperclip (7.0.1)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
@ -393,7 +393,7 @@ GEM
concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (>= 3.5)
statsd-ruby (~> 1.4, >= 1.4.0)
oj (3.13.10)
oj (3.13.11)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
@ -412,7 +412,7 @@ GEM
orm_adapter (0.5.0)
ox (2.14.6)
parallel (1.21.0)
parser (3.0.2.0)
parser (3.1.0.0)
ast (~> 2.4.1)
parslet (2.0.0)
pastel (0.8.0)
@ -500,7 +500,7 @@ GEM
redis (4.5.1)
redis-namespace (1.8.1)
redis (>= 3.0.4)
regexp_parser (2.1.1)
regexp_parser (2.2.0)
request_store (1.5.0)
rack (>= 1.4)
responders (3.0.1)
@ -532,21 +532,21 @@ GEM
rspec-sidekiq (3.1.0)
rspec-core (~> 3.0, >= 3.0.0)
sidekiq (>= 2.4.0)
rspec-support (3.10.2)
rspec_junit_formatter (0.4.1)
rspec-support (3.10.3)
rspec_junit_formatter (0.5.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.23.0)
rubocop (1.24.1)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.12.0, < 2.0)
rubocop-ast (>= 1.15.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.13.0)
rubocop-ast (1.15.1)
parser (>= 3.0.1.1)
rubocop-rails (2.12.4)
rubocop-rails (2.13.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
@ -676,7 +676,7 @@ GEM
xorcist (1.1.2)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.5.1)
zeitwerk (2.5.3)
PLATFORMS
ruby
@ -778,9 +778,9 @@ DEPENDENCIES
rqrcode (~> 2.1)
rspec-rails (~> 5.0)
rspec-sidekiq (~> 3.1)
rspec_junit_formatter (~> 0.4)
rubocop (~> 1.23)
rubocop-rails (~> 2.12)
rspec_junit_formatter (~> 0.5)
rubocop (~> 1.24)
rubocop-rails (~> 2.13)
ruby-progressbar (~> 1.11)
sanitize (~> 6.0)
scenic (~> 1.5)

View File

@ -71,7 +71,7 @@ export function normalizeStatus(status, normalOldStatus) {
}
const spoilerText = normalStatus.spoiler_text || '';
const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n');
const searchContent = ([spoilerText, status.content].concat((status.poll && status.poll.options) ? status.poll.options.map(option => option.title) : [])).concat(status.media_attachments.map(att => att.description)).join('\n\n').replace(/<br\s*\/?>/g, '\n').replace(/<\/p><p>/g, '\n\n');
const emojiMap = makeEmojiMap(normalStatus);
normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;

View File

@ -5,6 +5,7 @@ class PurgeDomainService < BaseService
Account.remote.where(domain: domain).reorder(nil).find_each do |account|
DeleteAccountService.new.call(account, reserve_username: false, skip_side_effects: true)
end
CustomEmoji.remote.where(domain: domain).reorder(nil).find_each(&:destroy)
Instance.refresh
end
end

View File

@ -61,13 +61,13 @@
},
"private": true,
"dependencies": {
"@babel/core": "^7.16.5",
"@babel/plugin-proposal-decorators": "^7.16.5",
"@babel/plugin-transform-react-inline-elements": "^7.16.5",
"@babel/plugin-transform-runtime": "^7.16.5",
"@babel/preset-env": "^7.16.5",
"@babel/preset-react": "^7.16.5",
"@babel/runtime": "^7.16.5",
"@babel/core": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.16.7",
"@babel/plugin-transform-react-inline-elements": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.16.7",
"@babel/preset-env": "^7.16.7",
"@babel/preset-react": "^7.16.7",
"@babel/runtime": "^7.16.7",
"@gamestdio/websocket": "^0.3.2",
"@github/webauthn-json": "^0.5.7",
"@rails/ujs": "^6.1.4",
@ -155,7 +155,7 @@
"requestidlecallback": "^0.3.0",
"reselect": "^4.1.5",
"rimraf": "^3.0.2",
"sass": "^1.45.1",
"sass": "^1.45.2",
"sass-loader": "^10.2.0",
"stacktrace-js": "^2.0.2",
"stringz": "^2.1.0",
@ -180,23 +180,23 @@
"babel-eslint": "^10.1.0",
"babel-jest": "^27.4.5",
"eslint": "^7.32.0",
"eslint-plugin-import": "~2.25.3",
"eslint-plugin-import": "~2.25.4",
"eslint-plugin-jsx-a11y": "~6.5.1",
"eslint-plugin-promise": "~6.0.0",
"eslint-plugin-react": "~7.27.1",
"eslint-plugin-react": "~7.28.0",
"jest": "^27.4.5",
"raf": "^3.4.1",
"react-intl-translations-manager": "^5.0.3",
"react-test-renderer": "^16.14.0",
"sass-lint": "^1.13.1",
"webpack-dev-server": "^3.11.3",
"yargs": "^17.3.0"
"yargs": "^17.3.1"
},
"resolutions": {
"kind-of": "^6.0.3"
},
"optionalDependencies": {
"bufferutil": "^4.0.5",
"utf-8-validate": "^5.0.7"
"bufferutil": "^4.0.6",
"utf-8-validate": "^5.0.8"
}
}

View File

@ -197,10 +197,12 @@ const startWorker = async (workerId) => {
/**
* @param {string} channel
* @param {function(string): void} callback
*/
const unsubscribe = (channel) => {
const unsubscribe = (channel, callback) => {
log.silly(`Removing listener for ${channel}`);
redisSubscribeClient.unsubscribe(channel);
redisSubscribeClient.unsubscribe(channel, callback);
};
const FALSE_VALUES = [

1290
yarn.lock

File diff suppressed because it is too large Load Diff