Put ActivityPub alternate link into Atom, prefer it when processing Atom (#4623)
This commit is contained in:
parent
efec02f153
commit
40c45f5dd9
6 changed files with 32 additions and 8 deletions
|
@ -8,6 +8,7 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
|
|||
end
|
||||
|
||||
return [nil, false] if @account.suspended?
|
||||
return perform_via_activitypub if activitypub_uri?
|
||||
|
||||
Rails.logger.debug "Creating remote status #{id}"
|
||||
|
||||
|
@ -52,6 +53,10 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
|
|||
[status, true]
|
||||
end
|
||||
|
||||
def perform_via_activitypub
|
||||
[find_status(activitypub_uri) || ActivityPub::FetchRemoteStatusService.new.call(activitypub_uri), false]
|
||||
end
|
||||
|
||||
def content
|
||||
@xml.at_xpath('./xmlns:content', xmlns: TagManager::XMLNS).content
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue