about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>2018-04-16 17:04:31 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-04-16 10:04:31 +0200
commita1049e93807f57796eb6229f2dd1388be8b18225 (patch)
treef8f67b9f7bb77dc251b4dffc86282f3c58387b67 /app
parent7c43ed04fec0603073fe0b5a687992cab684a3b5 (diff)
Redirect to account status page for page of status stream entry (#7104)
Commit 519119f657cf97ec187008a28dba00c1125a9292 missed a change for
stream entry page. Instead of duplicating the change, redirect to account
status page. It would also help crawlers (of search engines, for example)
to understand a stream entry URL and its corresponding status URL points
to the same page.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/stream_entries_controller.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb
index f81856cc6..97cf85079 100644
--- a/app/controllers/stream_entries_controller.rb
+++ b/app/controllers/stream_entries_controller.rb
@@ -15,8 +15,7 @@ class StreamEntriesController < ApplicationController
   def show
     respond_to do |format|
       format.html do
-        @ancestors   = @stream_entry.activity.reply? ? cache_collection(@stream_entry.activity.ancestors(current_account), Status) : []
-        @descendants = cache_collection(@stream_entry.activity.descendants(current_account), Status)
+        redirect_to short_account_status_url(params[:account_username], @stream_entry.activity) if @type == 'status'
       end
 
       format.atom do