diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2017-09-09 20:11:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-09 20:11:48 -0400 |
commit | 3dff74eecf5387b92b862893248710d2efb90eec (patch) | |
tree | 0d29d8c952a0c62e7de4348a1d63963fd5eca237 /app/controllers/stream_entries_controller.rb | |
parent | e18ed4bbc7ab4e258d05a3e2a5db0790f67a8f37 (diff) | |
parent | 14e1fb8d36763e5255e7b8e440ecaf02208db004 (diff) |
Merge pull request #141 from yipdw/sync/upstream
Sync with upstream @ v1.6.0rc3 ohhhhhhhhhhh heck here we go
Diffstat (limited to 'app/controllers/stream_entries_controller.rb')
-rw-r--r-- | app/controllers/stream_entries_controller.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb index 3eb91d830..cc579dbc8 100644 --- a/app/controllers/stream_entries_controller.rb +++ b/app/controllers/stream_entries_controller.rb @@ -25,10 +25,7 @@ class StreamEntriesController < ApplicationController end def embed - response.headers['X-Frame-Options'] = 'ALLOWALL' - return gone if @stream_entry.activity.nil? - - render layout: 'embedded' + redirect_to embed_short_account_status_url(@account, @stream_entry.activity), status: 301 end private @@ -38,7 +35,12 @@ class StreamEntriesController < ApplicationController end def set_link_headers - response.headers['Link'] = LinkHeader.new([[account_stream_entry_url(@account, @stream_entry, format: 'atom'), [%w(rel alternate), %w(type application/atom+xml)]]]) + response.headers['Link'] = LinkHeader.new( + [ + [account_stream_entry_url(@account, @stream_entry, format: 'atom'), [%w(rel alternate), %w(type application/atom+xml)]], + [ActivityPub::TagManager.instance.uri_for(@stream_entry.activity), [%w(rel alternate), %w(type application/activity+json)]], + ] + ) end def set_stream_entry |