Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

stream: Send PATCH request for stream description only if it is changed.

sahil839982fa366ae0b
diff --git a/static/js/stream_edit.js b/static/js/stream_edit.js
index 2d8ac13c5cd..4e83d1a60e6 100644
--- a/static/js/stream_edit.js
+++ b/static/js/stream_edit.js
@@ -602,6 +602,13 @@ exports.change_stream_description = function (e) {
const description = sub_settings.find(".stream-description-editable").text().trim();
$(".stream_change_property_info").hide();
+ if (description === sub.description) {
+ sub_settings
+ .find(".stream-description-editable")
+ .html(util.clean_user_content_links(sub.rendered_description));
+ return;
+ }
+
channel.patch({
// Description might contain unsafe characters so we must encode it first.
url: "/json/streams/" + stream_id,