mirror of https://github.com/zulip/zulip.git
9d2e8aef6d
The message_hover function in ui_init.js had an if condition to return early when is_topic_editable was false. We instead change it to return early when message.sent_by_me is false since in that case the edit_content element is not present. Note that we also show the "View source" icon when message is locally echoed or not sent successfully. Till now is_topic_editable is always true when message is sent by the user itself, and when message is sent by someone else the edit_content element does not exist in the DOM anyway. So, basically, it just helps in returing early and not unnecessarily move forward to set html for a non-existent div. So, we can ideally replace it with just `sent_by_me` condition and otherwise we already show the reaction icon. The comment above that also mentioned that "locally echoed messages have !is_topic_editable" which is not true since is_topic_editable does not check whether the message is locally-echoed or not. This comment was added in |
||
---|---|---|
.. | ||
assets | ||
audio/notification_sounds | ||
generated | ||
html | ||
images | ||
js | ||
shared | ||
styles | ||
templates | ||
third | ||
.gitignore |