mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
When `sort_emojis` function was called from emoji_picker module, the passed arguments did not contain `reaction_type` field. As a result the first conditional of `is_popular` function inside `sort_emojis` always failed -- hence the array `popular_emoji_matches` was always empty`[]`. This compromised search especially the order of filtered emojis. Instead of checking for `reaction_type` === "unicode_emoji" -- we check `is_realm_emoji` field is false. Since `is_realm_emoji` field in always present and also results in easier types, this should be prefered over adding `reaction_type` field to the passed arguments. Fixes zulip#30439