0
0
Fork 0

Allow Accept/Reject with a non-embedded object (#12199)

Some ActivityPub servers refuse to embed remote objects into their own
output. This is because they are not the authoritative source for these
objects, and as such embedding them is always a waste of space. The
follow request and follow models contain a URI, so this can be used to
match them.
This commit is contained in:
puckipedia 2019-10-24 20:45:43 +00:00 committed by Eugen Rochko
parent bd684e25d9
commit d2919f7e94
3 changed files with 19 additions and 8 deletions

View file

@ -153,6 +153,14 @@ class ActivityPub::Activity
fetch_remote_original_status
end
def follow_request_from_object
@follow_request ||= FollowRequest.find_by(target_account: @account, uri: object_uri) unless object_uri.nil?
end
def follow_from_object
@follow ||= Follow.find_by(target_account: @account, uri: object_uri) unless object_uri.nil?
end
def fetch_remote_original_status
if object_uri.start_with?('http')
return if ActivityPub::TagManager.instance.local_uri?(object_uri)