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.

compose: Ensure we don't warn unresolved topic if not composing for a topic.

evykassirer99d1c5a1f3e5
diff --git a/static/js/compose_state.js b/static/js/compose_state.js
index f678b2f3552..c44a733c066 100644
--- a/static/js/compose_state.js
+++ b/static/js/compose_state.js
@@ -12,6 +12,10 @@ export function get_message_type() {
return message_type;
}
+export function recipient_has_topics() {
+ return message_type !== "stream";
+}
+
export function composing() {
// This is very similar to get_message_type(), but it returns
// a boolean.
diff --git a/static/js/compose_validate.js b/static/js/compose_validate.js
index b68045bfae3..c3c92ef66b6 100644
--- a/static/js/compose_validate.js
+++ b/static/js/compose_validate.js
@@ -170,6 +170,9 @@ export function clear_topic_resolved_warning() {
}
export function warn_if_topic_resolved(topic_changed) {
+ if (compose_state.recipient_has_topics()) {
+ return;
+ }
// This function is called with topic_changed=false on every
// keypress when typing a message, so it should not do anything
// expensive in that case.