Fix alternative relay support regression (#10398)

Fix #10324
main
Eugen Rochko 2019-03-27 19:58:24 +01:00 committed by GitHub
parent 319bce3d9d
commit e86663b1da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -47,6 +47,10 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity
followed_by_local_accounts? || requested_through_relay? || reblog_of_local_status?
end
def requested_through_relay?
super || Relay.find_by(inbox_url: @account.inbox_url)&.enabled?
end
def reblog_of_local_status?
status_from_uri(object_uri)&.account&.local?
end