mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 02:40:53 -06:00
FIX: Make emoji cache store marshalled objects (#21029)
We only marshal arrays, hashes and sets, which meant that the emojis here were just getting `to_s`ed. This is a hack.
This commit is contained in:
parent
d289b20858
commit
fcc73b441d
@ -67,10 +67,14 @@ class Emoji
|
||||
[[global_emoji_cache, :standard], [site_emoji_cache, :custom]].each do |cache, list_key|
|
||||
found_emoji =
|
||||
cache.defer_get_set(normalized_name) do
|
||||
Emoji
|
||||
.public_send(list_key)
|
||||
.detect { |e| e.name == normalized_name && (!is_toned || (is_toned && e.tonable)) }
|
||||
end
|
||||
[
|
||||
Emoji
|
||||
.public_send(list_key)
|
||||
.detect { |e| e.name == normalized_name && (!is_toned || (is_toned && e.tonable)) },
|
||||
]
|
||||
end[
|
||||
0
|
||||
]
|
||||
|
||||
break if found_emoji
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user