Fallback from perform_via_activitypub on private posts (#4758)

Currently, private / direct posts via OStatus from AP compatible instance will be dropped due to failing to fetch AP version.

So this fallbacks to OStatus handling:

* when failed to fetch ActivityPub version
* when status is neither :public nor :unlisted
main
unarist 2017-09-01 19:33:02 +09:00 committed by Eugen Rochko
parent 9a5ae09620
commit af2d22f88c
1 changed files with 5 additions and 1 deletions

View File

@ -8,7 +8,11 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
end end
return [nil, false] if @account.suspended? return [nil, false] if @account.suspended?
return perform_via_activitypub if activitypub_uri?
if activitypub_uri? && [:public, :unlisted].include?(visibility_scope)
result = perform_via_activitypub
return result if result.first.present?
end
Rails.logger.debug "Creating remote status #{id}" Rails.logger.debug "Creating remote status #{id}"