Browse Source

Raise an error on getting activity uri for remote status (#4984)

We had returned `nil` for that case, but this raises an error instead, as a wrong usage of the method.
This method is currently only used in ActivitySerializer.
pull/4/head
unarist 6 years ago
committed by Eugen Rochko
parent
commit
3f07f1b2b1
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/lib/activitypub/tag_manager.rb

+ 1
- 1
app/lib/activitypub/tag_manager.rb View File

@ -37,7 +37,7 @@ class ActivityPub::TagManager
end
def activity_uri_for(target)
return nil unless %i(note comment activity).include?(target.object_type) && target.local?
raise ArgumentError, 'target must be a local activity' unless %i(note comment activity).include?(target.object_type) && target.local?
activity_account_status_url(target.account, target)
end

Loading…
Cancel
Save