Skip to content

Commit

Permalink
Fix mastodon#2120 - Use Status#as_tag_timeline on public hashtag page (
Browse files Browse the repository at this point in the history
…mastodon#2182)

* Fix mastodon#2120 - Use Status#as_tag_timeline on public hashtag page

* Update tags_controller.rb
  • Loading branch information
Gargron authored Apr 20, 2017
1 parent b79ba3d commit cae2a26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/tags_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ class TagsController < ApplicationController
layout 'public'

def show
@tag = Tag.find_by!(name: params[:id].downcase)
@statuses = @tag.statuses.order('id desc').paginate_by_max_id(20, params[:max_id])
@tag = Tag.find_by(name: params[:id].downcase)
@statuses = @tag.nil? ? [] : Status.as_tag_timeline(@tag, current_account, params[:local]).paginate_by_max_id(20, params[:max_id])
@statuses = cache_collection(@statuses, Status)
end
end

0 comments on commit cae2a26

Please sign in to comment.