闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
578 B

  1. # frozen_string_literal: true
  2. class Api::Activitypub::ActivitiesController < ApiController
  3. # before_action :set_follow, only: [:show_follow]
  4. before_action :set_status, only: [:show_status]
  5. respond_to :activitystreams2
  6. # Show a status in AS2 format, as either an Announce (reblog) or a Create (post) activity.
  7. def show_status
  8. return forbidden unless @status.permitted?
  9. if @status.reblog?
  10. render :show_status_announce
  11. else
  12. render :show_status_create
  13. end
  14. end
  15. private
  16. def set_status
  17. @status = Status.find(params[:id])
  18. end
  19. end