mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
Previously, on clicking the "bell" icon from a recent topics topic row, two click handlers were triggered- 1. The one for the bell in the recent-topics topic row. 2. The one for the bell in the floating recipient bar. This is intended to be triggered only when the user clicks on the bell icon in the floating recipient bar to mute a topic, but this was triggered on clicking the recent-topics topic row bell too, because it wasn't specific and we use the same HTML class for both the bells. Because both these click handlers were triggered, the webapp sent back-to-back duplicate requests to the server to mute the topic, which caused the sever to throw "HTTP 400: Topic already muted" error. This commit fixes this by making the recipient bar click handler more specific, so that it is triggered only when the recipient bar bell icon is clicked. There is also the issue that the recipient bar bell icon only allows a user to mute the topic, not unmute. So, when someone mutes a topic, and then clicks on the recipient bar bell icon, the webapp sends a request to mute the topic again (not to unmute), leading to the same error as above. This commit does not fix that. See #15223.
36 KiB
36 KiB