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 ine1c4c7b80. This also fixes the bug where "View source" icon is not shown when "message.sent_by_me" is true and both editing and moving message is not allowed which currently happens when allow_message_editing setting is False. Also, the "is_topic_editable" condition will be not valid in future when "is_topic_editable" can be false when "sent_by_me" is true. In such cases we would not show any icon then, so better to fix this here. Some history of this code- - Intially we returned only when !sent_by_me was false, but added a condition to return early when realm_allow_community_topic_editing was false in91197fa4f1. Though it was not needed since edit_content element amyways did not existed when `sent_by_me` was false. - Then the condition was then changed to return early if is_topic_editable was false in689c717284.
Zulip overview
Zulip is an open-source team collaboration tool with unique topic-based threading that combines the best of email and chat to make remote work productive and delightful. Fortune 500 companies, leading open source projects, and thousands of other organizations use Zulip every day. Zulip is the only modern team chat app that is designed for both live and asynchronous conversations.
Zulip is built by a distributed community of developers from all around the world, with 74+ people who have each contributed 100+ commits. With over 1000 contributors merging over 500 commits a month, Zulip is the largest and fastest growing open source team chat project.
Come find us on the development community chat!
Getting started
-
Contributing code. Check out our guide for new contributors to get started. We have invested in making Zulip’s code highly readable, thoughtfully tested, and easy to modify. Beyond that, we have written an extraordinary 150K words of documentation for Zulip contributors.
-
Contributing non-code. Report an issue, translate Zulip into your language, or give us feedback. We'd love to hear from you, whether you've been using Zulip for years, or are just trying it out for the first time.
-
Checking Zulip out. The best way to see Zulip in action is to drop by the Zulip community server. We also recommend reading about Zulip's unique approach to organizing conversations.
-
Running a Zulip server. Self-host Zulip directly on Ubuntu or Debian Linux, in Docker, or with prebuilt images for Digital Ocean and Render. Learn more about self-hosting Zulip.
-
Using Zulip without setting up a server. Learn about Zulip Cloud hosting options. Zulip sponsors free Zulip Cloud Standard for hundreds of worthy organizations, including fellow open-source projects.
-
Participating in outreach programs like Google Summer of Code and Outreachy.
-
Supporting Zulip. Advocate for your organization to use Zulip, become a sponsor, write a review in the mobile app stores, or help others find Zulip.
You may also be interested in reading our blog, and following us on Twitter and LinkedIn.
Zulip is distributed under the Apache 2.0 license.