Fix: 一部サーバーの投稿が参照引用できない問題・参照引用時、フェッチを基本しないよう変更 (#360)
This commit is contained in:
parent
6dbe5c882d
commit
1f73b81bd8
7 changed files with 81 additions and 18 deletions
|
@ -141,11 +141,20 @@ class ProcessReferencesService < BaseService
|
|||
end
|
||||
|
||||
def url_to_status(url)
|
||||
ResolveURLService.new.call(url, on_behalf_of: @status.account, fetch_remote: @fetch_remote && @no_fetch_urls.exclude?(url))
|
||||
status = ActivityPub::TagManager.instance.uri_to_resource(url, Status, url: true)
|
||||
status ||= ResolveURLService.new.call(url, on_behalf_of: @status.account) if @fetch_remote && @no_fetch_urls.exclude?(url)
|
||||
referrable?(status) ? status : nil
|
||||
end
|
||||
|
||||
def referrable?(target_status)
|
||||
return false if target_status.nil?
|
||||
return @referrable if defined?(@referrable)
|
||||
|
||||
@referrable = StatusPolicy.new(@status.account, target_status).show?
|
||||
end
|
||||
|
||||
def quotable?(target_status)
|
||||
target_status.account.allow_quote? && (!@status.local? || StatusPolicy.new(@status.account, target_status).quote?)
|
||||
target_status.account.allow_quote? && StatusPolicy.new(@status.account, target_status).quote?
|
||||
end
|
||||
|
||||
def add_references
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue