|
|
@ -5,7 +5,7 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity |
|
|
|
original_status = status_from_uri(object_uri) |
|
|
|
original_status = status_from_uri(object_uri) |
|
|
|
original_status ||= fetch_remote_original_status |
|
|
|
original_status ||= fetch_remote_original_status |
|
|
|
|
|
|
|
|
|
|
|
return if original_status.nil? || delete_arrived_first?(@json['id']) |
|
|
|
return if original_status.nil? || delete_arrived_first?(@json['id']) || !announceable?(original_status) |
|
|
|
|
|
|
|
|
|
|
|
status = Status.find_by(account: @account, reblog: original_status) |
|
|
|
status = Status.find_by(account: @account, reblog: original_status) |
|
|
|
|
|
|
|
|
|
|
@ -33,4 +33,8 @@ class ActivityPub::Activity::Announce < ActivityPub::Activity |
|
|
|
::FetchRemoteStatusService.new.call(@object['url']) |
|
|
|
::FetchRemoteStatusService.new.call(@object['url']) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def announceable?(status) |
|
|
|
|
|
|
|
status.public_visibility? || status.unlisted_visibility? |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|