diff options
Diffstat (limited to 'app/controllers/stream_entries_controller.rb')
-rw-r--r-- | app/controllers/stream_entries_controller.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb index 98d029030..58dd423f7 100644 --- a/app/controllers/stream_entries_controller.rb +++ b/app/controllers/stream_entries_controller.rb @@ -9,8 +9,6 @@ class StreamEntriesController < ApplicationController before_action :check_account_suspension def show - @type = @stream_entry.activity_type.downcase - respond_to do |format| format.html do return gone if @stream_entry.activity.nil? @@ -25,6 +23,15 @@ class StreamEntriesController < ApplicationController end end + def embed + response.headers['X-Frame-Options'] = 'ALLOWALL' + @external_links = true + + return gone if @stream_entry.activity.nil? + + render layout: 'embedded' + end + private def set_account @@ -37,6 +44,7 @@ class StreamEntriesController < ApplicationController def set_stream_entry @stream_entry = @account.stream_entries.find(params[:id]) + @type = @stream_entry.activity_type.downcase end def check_account_suspension |