|
|
@ -27,10 +27,7 @@ class StatusesController < ApplicationController
|
|
|
|
def show
|
|
|
|
def show
|
|
|
|
respond_to do |format|
|
|
|
|
respond_to do |format|
|
|
|
|
format.html do
|
|
|
|
format.html do
|
|
|
|
if current_account.nil?
|
|
|
|
expires_in 10.seconds, public: true if current_account.nil?
|
|
|
|
skip_session!
|
|
|
|
|
|
|
|
expires_in 10.seconds, public: true
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@body_classes = 'with-modals'
|
|
|
|
@body_classes = 'with-modals'
|
|
|
|
|
|
|
|
|
|
|
@ -41,8 +38,6 @@ class StatusesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
format.json do
|
|
|
|
format.json do
|
|
|
|
mark_cacheable! unless @stream_entry.hidden?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render_cached_json(['activitypub', 'note', @status], content_type: 'application/activity+json', public: !@stream_entry.hidden?) do
|
|
|
|
render_cached_json(['activitypub', 'note', @status], content_type: 'application/activity+json', public: !@stream_entry.hidden?) do
|
|
|
|
ActiveModelSerializers::SerializableResource.new(@status, serializer: ActivityPub::NoteSerializer, adapter: ActivityPub::Adapter)
|
|
|
|
ActiveModelSerializers::SerializableResource.new(@status, serializer: ActivityPub::NoteSerializer, adapter: ActivityPub::Adapter)
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -51,8 +46,6 @@ class StatusesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def activity
|
|
|
|
def activity
|
|
|
|
skip_session!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render_cached_json(['activitypub', 'activity', @status], content_type: 'application/activity+json', public: !@stream_entry.hidden?) do
|
|
|
|
render_cached_json(['activitypub', 'activity', @status], content_type: 'application/activity+json', public: !@stream_entry.hidden?) do
|
|
|
|
ActiveModelSerializers::SerializableResource.new(@status, serializer: ActivityPub::ActivitySerializer, adapter: ActivityPub::Adapter)
|
|
|
|
ActiveModelSerializers::SerializableResource.new(@status, serializer: ActivityPub::ActivitySerializer, adapter: ActivityPub::Adapter)
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -61,7 +54,6 @@ class StatusesController < ApplicationController
|
|
|
|
def embed
|
|
|
|
def embed
|
|
|
|
raise ActiveRecord::RecordNotFound if @status.hidden?
|
|
|
|
raise ActiveRecord::RecordNotFound if @status.hidden?
|
|
|
|
|
|
|
|
|
|
|
|
skip_session!
|
|
|
|
|
|
|
|
expires_in 180, public: true
|
|
|
|
expires_in 180, public: true
|
|
|
|
response.headers['X-Frame-Options'] = 'ALLOWALL'
|
|
|
|
response.headers['X-Frame-Options'] = 'ALLOWALL'
|
|
|
|
@autoplay = ActiveModel::Type::Boolean.new.cast(params[:autoplay])
|
|
|
|
@autoplay = ActiveModel::Type::Boolean.new.cast(params[:autoplay])
|
|
|
@ -70,8 +62,6 @@ class StatusesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def replies
|
|
|
|
def replies
|
|
|
|
skip_session!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render json: replies_collection_presenter,
|
|
|
|
render json: replies_collection_presenter,
|
|
|
|
serializer: ActivityPub::CollectionSerializer,
|
|
|
|
serializer: ActivityPub::CollectionSerializer,
|
|
|
|
adapter: ActivityPub::Adapter,
|
|
|
|
adapter: ActivityPub::Adapter,
|
|
|
|