Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - `app/services/process_mentions_service.rb`: glitch-soc local-only handling, ported upstream changes
This commit is contained in:
@ -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) => {
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user