Fix tagged param not being normalized before querying tags (#10249)

This commit is contained in:
Eugen Rochko 2019-03-13 13:02:13 +01:00 committed by GitHub
parent d4ef90eae3
commit 06663fcf87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 4 deletions

View file

@ -80,7 +80,13 @@ class AccountsController < ApplicationController
end
def hashtag_scope
Status.tagged_with(Tag.find_by(name: params[:tag].downcase)&.id)
tag = Tag.find_normalized(params[:tag])
if tag
Status.tagged_with(tag.id)
else
Status.none
end
end
def set_account