diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-06-07 17:00:36 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-06-07 17:00:36 +0200 |
commit | 34b8346e7f1274d40734f9da3100a4343cf9f81c (patch) | |
tree | 1a851db65a949df937de0a3eb4fce1e9f83e5301 /app/controllers/statuses_controller.rb | |
parent | 83600198961cce9bfe82cf0f0c33286703bc86d1 (diff) | |
parent | a60364ca7d26c82c9353980d0966d37e9aa66014 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - app/controllers/statuses_controller.rb - app/controllers/stream_entries_controller.rb
Diffstat (limited to 'app/controllers/statuses_controller.rb')
-rw-r--r-- | app/controllers/statuses_controller.rb | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/app/controllers/statuses_controller.rb b/app/controllers/statuses_controller.rb index 28eebda28..66ba260aa 100644 --- a/app/controllers/statuses_controller.rb +++ b/app/controllers/statuses_controller.rb @@ -29,10 +29,7 @@ class StatusesController < ApplicationController format.html do use_pack 'public' - unless user_signed_in? - skip_session! - expires_in 10.seconds, public: true - end + expires_in 10.seconds, public: true if current_account.nil? @body_classes = 'with-modals' @@ -43,8 +40,6 @@ class StatusesController < ApplicationController end 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 ActiveModelSerializers::SerializableResource.new(@status, serializer: ActivityPub::NoteSerializer, adapter: ActivityPub::Adapter) end @@ -53,8 +48,6 @@ class StatusesController < ApplicationController end def activity - skip_session! - 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) end @@ -64,7 +57,6 @@ class StatusesController < ApplicationController use_pack 'embed' raise ActiveRecord::RecordNotFound if @status.hidden? - skip_session! expires_in 180, public: true response.headers['X-Frame-Options'] = 'ALLOWALL' @autoplay = ActiveModel::Type::Boolean.new.cast(params[:autoplay]) @@ -73,8 +65,6 @@ class StatusesController < ApplicationController end def replies - skip_session! - render json: replies_collection_presenter, serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter, |