diff options
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/activitypub/activity.rb | 10 | ||||
-rw-r--r-- | app/lib/activitypub/activity/update.rb | 2 |
2 files changed, 2 insertions, 10 deletions
diff --git a/app/lib/activitypub/activity.rb b/app/lib/activitypub/activity.rb index 706960f92..f599e1b58 100644 --- a/app/lib/activitypub/activity.rb +++ b/app/lib/activitypub/activity.rb @@ -71,15 +71,7 @@ class ActivityPub::Activity end def object_uri - @object_uri ||= begin - str = value_or_id(@object) - - if str&.start_with?('bear:') - Addressable::URI.parse(str).query_values['u'] - else - str - end - end + @object_uri ||= uri_from_bearcap(value_or_id(@object)) end def unsupported_object_type? diff --git a/app/lib/activitypub/activity/update.rb b/app/lib/activitypub/activity/update.rb index 36ad5f446..5802ead5d 100644 --- a/app/lib/activitypub/activity/update.rb +++ b/app/lib/activitypub/activity/update.rb @@ -20,7 +20,7 @@ class ActivityPub::Activity::Update < ActivityPub::Activity end def update_status - return reject_payload! if invalid_origin?(@object['id']) + return reject_payload! if invalid_origin?(object_uri) @status = Status.find_by(uri: object_uri, account_id: @account.id) |