Fetch reblogs as Announce activity instead of Note object (#4672)
* Process Create / Announce activity in FetchRemoteStatusService * Use activity URL in ActivityPub for reblogs * Redirect to the original status on StatusesController#show
This commit is contained in:
parent
c66fe2aeba
commit
b01a19fe39
6 changed files with 118 additions and 11 deletions
|
@ -19,6 +19,7 @@ class ActivityPub::TagManager
|
|||
when :person
|
||||
short_account_url(target)
|
||||
when :note, :comment, :activity
|
||||
return activity_account_status_url(target.account, target) if target.reblog?
|
||||
short_account_status_url(target.account, target)
|
||||
end
|
||||
end
|
||||
|
@ -30,10 +31,17 @@ class ActivityPub::TagManager
|
|||
when :person
|
||||
account_url(target)
|
||||
when :note, :comment, :activity
|
||||
return activity_account_status_url(target.account, target) if target.reblog?
|
||||
account_status_url(target.account, target)
|
||||
end
|
||||
end
|
||||
|
||||
def activity_uri_for(target)
|
||||
return nil unless %i(note comment activity).include?(target.object_type) && target.local?
|
||||
|
||||
activity_account_status_url(target.account, target)
|
||||
end
|
||||
|
||||
# Primary audience of a status
|
||||
# Public statuses go out to primarily the public collection
|
||||
# Unlisted and private statuses go out primarily to the followers collection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue