From 1997e331ce4059819ab2e9a68899c30f3d64354c Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 26 Nov 2016 15:24:14 +0100 Subject: [PATCH] Fix #278 - Use mb_chars.downcase on hashtags --- app/services/process_hashtags_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/process_hashtags_service.rb b/app/services/process_hashtags_service.rb index 3bf3471ec4..fa14c44da5 100644 --- a/app/services/process_hashtags_service.rb +++ b/app/services/process_hashtags_service.rb @@ -4,7 +4,7 @@ class ProcessHashtagsService < BaseService def call(status, tags = []) tags = status.text.scan(Tag::HASHTAG_RE).map(&:first) if status.local? - tags.map(&:downcase).uniq.each do |tag| + tags.map { |str| str.mb_chars.downcase }.uniq.each do |tag| status.tags << Tag.where(name: tag).first_or_initialize(name: tag) end end