Support more variations of ActivityPub keyId in signature (#4630)
- Tries to avoid performing HTTP request if the keyId is an actor URI - Likewise if the URI is a fragment URI on top of actor URI - Resolves public key, returns owner if the owner links back to the key
This commit is contained in:
@ -20,6 +20,6 @@ class ActivityPub::Activity::Accept < ActivityPub::Activity
|
||||
end
|
||||
|
||||
def target_uri
|
||||
@target_uri ||= @object['actor']
|
||||
@target_uri ||= value_or_id(@object['actor'])
|
||||
end
|
||||
end
|
||||
|
@ -20,6 +20,6 @@ class ActivityPub::Activity::Reject < ActivityPub::Activity
|
||||
end
|
||||
|
||||
def target_uri
|
||||
@target_uri ||= @object['actor']
|
||||
@target_uri ||= value_or_id(@object['actor'])
|
||||
end
|
||||
end
|
||||
|
@ -64,6 +64,6 @@ class ActivityPub::Activity::Undo < ActivityPub::Activity
|
||||
end
|
||||
|
||||
def target_uri
|
||||
@target_uri ||= @object['object'].is_a?(String) ? @object['object'] : @object['object']['id']
|
||||
@target_uri ||= value_or_id(@object['object'])
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user