闭社主体 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.

27 lines
592 B

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