FIX: Return a UTF-8 string in tag notifications

https://meta.discourse.org/t/tags-does-not-work-with-cyrillic/67217
This commit is contained in:
Matt Palmer 2017-08-01 16:27:52 +10:00
parent 54f09ca59d
commit 7ee861f457
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ class TagsController < ::ApplicationController
tag = Tag.find_by_name(params[:tag_id])
raise Discourse::NotFound unless tag
level = tag.tag_users.where(user: current_user).first.try(:notification_level) || TagUser.notification_levels[:regular]
render json: { tag_notification: { id: params[:tag_id], notification_level: level.to_i } }
render json: { tag_notification: { id: tag.name, notification_level: level.to_i } }
end
def update_notifications