Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `.prettierignore`: Upstream added a line at the end of the file, while glitch-soc had its own extra lines. Took upstream's change. - `CONTRIBUTING.md`: We have our custom CONTRIBUTING.md quoting upstream. Upstream made changes. Ported upstream changes. - `app/controllers/application_controller.rb`: Upstream made code style changes in a method that is entirely replaced in glitch-soc. Ignored the change. - `app/models/account.rb`: Code style changes textually close to glitch-soc-specific changes. Ported upstream changes. - `lib/sanitize_ext/sanitize_config.rb`: Upstream code style changes. Ignored them.
This commit is contained in:
@ -153,6 +153,7 @@ class ActivityPub::Activity
|
||||
def fetch_remote_original_status
|
||||
if object_uri.start_with?('http')
|
||||
return if ActivityPub::TagManager.instance.local_uri?(object_uri)
|
||||
|
||||
ActivityPub::FetchRemoteStatusService.new.call(object_uri, id: true, on_behalf_of: @account.followers.local.first, request_id: @options[:request_id])
|
||||
elsif @object['url'].present?
|
||||
::FetchRemoteStatusService.new.call(@object['url'], request_id: @options[:request_id])
|
||||
|
@ -13,7 +13,7 @@ module ActivityPub::CaseTransform
|
||||
when Symbol then camel_lower(value.to_s).to_sym
|
||||
when String
|
||||
camel_lower_cache[value] ||= if value.start_with?('_:')
|
||||
'_:' + value.gsub(/\A_:/, '').underscore.camelize(:lower)
|
||||
"_:#{value.gsub(/\A_:/, '').underscore.camelize(:lower)}"
|
||||
else
|
||||
value.underscore.camelize(:lower)
|
||||
end
|
||||
|
@ -32,7 +32,7 @@ class ActivityPub::LinkedDataSignature
|
||||
|
||||
def sign!(creator, sign_with: nil)
|
||||
options = {
|
||||
'type' => 'RsaSignature2017',
|
||||
'type' => 'RsaSignature2017',
|
||||
'creator' => ActivityPub::TagManager.instance.key_uri_for(creator),
|
||||
'created' => Time.now.utc.iso8601,
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ class ActivityPub::TagManager
|
||||
target.instance_actor? ? about_more_url(instance_actor: true) : short_account_url(target)
|
||||
when :note, :comment, :activity
|
||||
return activity_account_status_url(target.account, target) if target.reblog?
|
||||
|
||||
short_account_status_url(target.account, target)
|
||||
end
|
||||
end
|
||||
@ -38,6 +39,7 @@ class ActivityPub::TagManager
|
||||
target.instance_actor? ? instance_actor_url : account_url(target)
|
||||
when :note, :comment, :activity
|
||||
return activity_account_status_url(target.account, target) if target.reblog?
|
||||
|
||||
account_status_url(target.account, target)
|
||||
when :emoji
|
||||
emoji_url(target)
|
||||
|
Reference in New Issue
Block a user