Merge pull request #1442 from ThibG/glitch-soc/merge-upstream

Merge upstream changes
This commit is contained in:
ThibG 2020-10-26 16:11:58 +01:00 committed by GitHub
commit 9c88792f0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 547 additions and 551 deletions

View file

@ -133,7 +133,7 @@ group :test do
end
group :development do
gem 'active_record_query_trace', '~> 1.7'
gem 'active_record_query_trace', '~> 1.8'
gem 'annotate', '~> 3.1'
gem 'better_errors', '~> 2.8'
gem 'binding_of_caller', '~> 0.7'

View file

@ -44,7 +44,7 @@ GEM
activemodel (>= 4.1, < 6.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
active_record_query_trace (1.7)
active_record_query_trace (1.8)
activejob (5.2.4.4)
activesupport (= 5.2.4.4)
globalid (>= 0.3.6)
@ -367,7 +367,7 @@ GEM
concurrent-ruby (~> 1.0, >= 1.0.2)
sidekiq (>= 3.5)
statsd-ruby (~> 1.4, >= 1.4.0)
oj (3.10.14)
oj (3.10.15)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 1.6.2, < 3)
@ -375,7 +375,7 @@ GEM
addressable (~> 2.3)
nokogiri (~> 1.5)
omniauth (~> 1.2)
omniauth-saml (1.10.2)
omniauth-saml (1.10.3)
omniauth (~> 1.3, >= 1.3.2)
ruby-saml (~> 1.9)
openssl (2.2.0)
@ -533,7 +533,7 @@ GEM
rspec-support (3.9.3)
rspec_junit_formatter (0.4.1)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.93.0)
rubocop (0.93.1)
parallel (~> 1.10)
parser (>= 2.7.1.5)
rainbow (>= 2.2.2, < 4.0)
@ -542,7 +542,7 @@ GEM
rubocop-ast (>= 0.6.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.7.1)
rubocop-ast (0.8.0)
parser (>= 2.7.1.5)
rubocop-rails (2.8.1)
activesupport (>= 4.2.0)
@ -631,7 +631,7 @@ GEM
unf (~> 0.1.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
tzinfo-data (1.2020.2)
tzinfo-data (1.2020.3)
tzinfo (>= 1.0.0)
unf (0.1.4)
unf_ext
@ -650,7 +650,7 @@ GEM
safety_net_attestation (~> 0.4.0)
securecompare (~> 1.0)
tpm-key_attestation (~> 0.9.0)
webmock (3.9.1)
webmock (3.9.3)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
@ -675,7 +675,7 @@ PLATFORMS
DEPENDENCIES
active_model_serializers (~> 0.10)
active_record_query_trace (~> 1.7)
active_record_query_trace (~> 1.8)
addressable (~> 2.7)
annotate (~> 3.1)
aws-sdk-s3 (~> 1.83)

View file

@ -53,14 +53,20 @@ import {
} from 'flavours/glitch/actions/directory';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
const initialListState = ImmutableMap({
next: null,
isLoading: false,
items: ImmutableList(),
});
const initialState = ImmutableMap({
followers: ImmutableMap(),
following: ImmutableMap(),
reblogged_by: ImmutableMap(),
favourited_by: ImmutableMap(),
follow_requests: ImmutableMap(),
blocks: ImmutableMap(),
mutes: ImmutableMap(),
followers: initialListState,
following: initialListState,
reblogged_by: initialListState,
favourited_by: initialListState,
follow_requests: initialListState,
blocks: initialListState,
mutes: initialListState,
});
const normalizeList = (state, path, accounts, next) => {

View file

@ -53,14 +53,20 @@ import {
} from 'mastodon/actions/directory';
import { Map as ImmutableMap, List as ImmutableList } from 'immutable';
const initialListState = ImmutableMap({
next: null,
isLoading: false,
items: ImmutableList(),
});
const initialState = ImmutableMap({
followers: ImmutableMap(),
following: ImmutableMap(),
reblogged_by: ImmutableMap(),
favourited_by: ImmutableMap(),
follow_requests: ImmutableMap(),
blocks: ImmutableMap(),
mutes: ImmutableMap(),
followers: initialListState,
following: initialListState,
reblogged_by: initialListState,
favourited_by: initialListState,
follow_requests: initialListState,
blocks: initialListState,
mutes: initialListState,
});
const normalizeList = (state, path, accounts, next) => {

View file

@ -196,7 +196,7 @@ class ActivityPub::ProcessAccountService < BaseService
total_items = collection.is_a?(Hash) && collection['totalItems'].present? && collection['totalItems'].is_a?(Numeric) ? collection['totalItems'] : nil
has_first_page = collection.is_a?(Hash) && collection['first'].present?
@collections[type] = [total_items, has_first_page]
rescue HTTP::Error, OpenSSL::SSL::SSLError
rescue HTTP::Error, OpenSSL::SSL::SSLError, Mastodon::LengthValidationError
@collections[type] = [nil, nil]
end

View file

@ -60,7 +60,7 @@ class ProcessMentionsService < BaseService
if mentioned_account.local?
LocalNotificationWorker.perform_async(mentioned_account.id, mention.id, mention.class.name, :mention)
elsif mentioned_account.activitypub? && !@status.local_only?
ActivityPub::DeliveryWorker.perform_async(activitypub_json, mention.status.account_id, mentioned_account.inbox_url)
ActivityPub::DeliveryWorker.perform_async(activitypub_json, mention.status.account_id, mentioned_account.inbox_url, { synchronize_followers: !mention.status.distributable? })
end
end

View file

@ -4,7 +4,7 @@ image:
repository: tootsuite/mastodon
pullPolicy: Always
# https://hub.docker.com/r/tootsuite/mastodon/tags
tag: v3.2.0
tag: v3.2.1
# alternatively, use `latest` for the latest release or `edge` for the image
# built from the most recent commit
#

View file

@ -60,17 +60,17 @@
},
"private": true,
"dependencies": {
"@babel/core": "^7.11.6",
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-decorators": "^7.10.5",
"@babel/plugin-transform-react-inline-elements": "^7.10.4",
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/preset-react": "^7.10.4",
"@babel/runtime": "^7.11.2",
"@babel/plugin-proposal-decorators": "^7.12.1",
"@babel/plugin-transform-react-inline-elements": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.1",
"@babel/runtime": "^7.12.1",
"@clusterws/cws": "^3.0.0",
"@gamestdio/websocket": "^0.3.2",
"@github/webauthn-json": "^0.5.6",
"@github/webauthn-json": "^0.5.7",
"@rails/ujs": "^6.0.3",
"array-includes": "^3.1.1",
"atrament": "0.2.4",
@ -127,8 +127,8 @@
"promise.prototype.finally": "^3.1.2",
"prop-types": "^15.5.10",
"punycode": "^2.1.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"react-hotkeys": "^1.1.4",
"react-immutable-proptypes": "^2.2.0",
"react-immutable-pure-component": "^2.2.2",
@ -174,7 +174,7 @@
},
"devDependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.0.4",
"@testing-library/react": "^11.1.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.5.2",
"eslint": "^7.11.0",
@ -188,7 +188,7 @@
"react-test-renderer": "^16.13.1",
"sass-lint": "^1.13.1",
"webpack-dev-server": "^3.11.0",
"yargs": "^16.0.3"
"yargs": "^16.1.0"
},
"resolutions": {
"kind-of": "^6.0.3"

1010
yarn.lock

File diff suppressed because it is too large Load diff