diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-02-15 18:19:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-15 18:19:45 +0100 |
commit | c417e8c198238f80396c0e4e89c2653e4217108a (patch) | |
tree | 245ffe23cbb643ca51b98a62b402bffff87d777b /app/lib/activitypub/activity/create.rb | |
parent | 8ef50706a11e115e8b4aa31b30de93738bc7e754 (diff) |
Filter incoming Announce activities by relation to local activity (#10041)
* Filter incoming Announce activities by relation to local activity Reject if announcer is not followed by local accounts, and is not from an enabled relay, and the object is not a local status Follow-up to #10005 * Fix tests
Diffstat (limited to 'app/lib/activitypub/activity/create.rb')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index 1b31768d9..4fc37fb4b 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -341,18 +341,6 @@ class ActivityPub::Activity::Create < ActivityPub::Activity responds_to_followed_account? || addresses_local_accounts? end - def fetch? - !@options[:delivery] - end - - def followed_by_local_accounts? - @account.passive_relationships.exists? - end - - def requested_through_relay? - @options[:relayed_through_account] && Relay.find_by(inbox_url: @options[:relayed_through_account].inbox_url)&.enabled? - end - def responds_to_followed_account? !replied_to_status.nil? && (replied_to_status.account.local? || replied_to_status.account.passive_relationships.exists?) end |