summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-22 17:01:53 +0100
committerPhil Hughes <me@iamphill.com>2016-04-22 17:01:53 +0100
commit319c9360551280f7345c5d16ffb34fe5e73a1598 (patch)
tree90668f844ad4310aa738146e0996262cd14fb073 /lib
parentd5398e9656c1174d4d5be5a8cdad2a26d7587a27 (diff)
downloadgitlab-ce-319c9360551280f7345c5d16ffb34fe5e73a1598.tar.gz
Fixes issue with emoji comments not showing correct emoji image
Previously it would look for the unicode character inside the award menu. But this menu might not always be there. Now, the unicode characters are loaded onto the page in an array which the award emoji that looks in to get the correct emoji unicode character Fixes #15512
Diffstat (limited to 'lib')
-rw-r--r--lib/award_emoji.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/award_emoji.rb b/lib/award_emoji.rb
index 5f8ff01b0a9..ad78bb530f4 100644
--- a/lib/award_emoji.rb
+++ b/lib/award_emoji.rb
@@ -52,6 +52,11 @@ class AwardEmoji
end
end
+ def self.unicode
+ emojis
+ emojis.map{|key, value| { key => emojis[key]["unicode"] } }.inject(:merge!)
+ end
+
def self.aliases
@aliases ||= begin
json_path = File.join(Rails.root, 'fixtures', 'emojis', 'aliases.json' )