FEATURE: remap emojis back for push notifications and desktop alerts

This commit is contained in:
Sam
2016-10-11 13:03:21 +11:00
parent 6031e692f0
commit 89daa43754
5 changed files with 28 additions and 7 deletions

View File

@@ -173,6 +173,19 @@ class Emoji
@unicode_replacements
end
def self.lookup_unicode(name)
@reverse_map ||= begin
map = {}
db['emojis'].each do |e|
next if e['name'] == 'tm'
code = replacement_code(e['code'])
map[e['name']] = code if code
end
map
end
@reverse_map[name]
end
def self.unicode_replacements_json
@unicode_replacements_json ||= unicode_replacements.to_json
end