0
0
Fork 0

Put ActivityPub alternate link into Atom, prefer it when processing Atom (#4623)

This commit is contained in:
Eugen Rochko 2017-08-18 01:03:18 +02:00 committed by GitHub
parent efec02f153
commit 40c45f5dd9
6 changed files with 32 additions and 8 deletions

View file

@ -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