mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
Previously, if a user had a realm emoji set as their status emoji and someone deleted the realm emoji, the app would fail to initialize, because of the error we throw from `./shared/js/emoji.js`. This commit fixes this by just displaying the deactivated emoji, similar to how we do when realm_emoji used as reactions are deleted. As part of the fix, we add a function get_emoji_details_for_rendering, which duplicates some of the logic used in `reactions.js`, we can refactor to remove the duplication in `reactions.js` in future commits. Note that the following behaviour is a part of our design: If a user sets their emoji to a particular realm emoji, say for example "octo-ninja", and "octo-ninja" was then deleted, and a new emoji was added with the name "octo-ninja", the user's status emoji would change to show the new emoji instead of the deleted emoji. Also note that in the `user_status.js` node test, we were able to change the name for the 991 realm_emoji because it had not been previously used anywhere in the test (possibly added as just a copy paste artifact?). Fixes: #20274. emoji: Use reaction_type parameter to analyze emoji.
2.7 KiB
2.7 KiB