mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-22 12:35:07 +01:00
122d59ac41
* Change ActivityPub paging to match spec. Clean up ActivityPub outbox changes. * Fix code style and test failures for OutboxController. * Attempt to fix CI errors.
26 lines
578 B
Ruby
26 lines
578 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Api::Activitypub::ActivitiesController < ApiController
|
|
# before_action :set_follow, only: [:show_follow]
|
|
before_action :set_status, only: [:show_status]
|
|
|
|
respond_to :activitystreams2
|
|
|
|
# Show a status in AS2 format, as either an Announce (reblog) or a Create (post) activity.
|
|
def show_status
|
|
return forbidden unless @status.permitted?
|
|
|
|
if @status.reblog?
|
|
render :show_status_announce
|
|
else
|
|
render :show_status_create
|
|
end
|
|
end
|
|
|
|
private
|
|
|
|
def set_status
|
|
@status = Status.find(params[:id])
|
|
end
|
|
end
|