resolved_topic: Add and use predicate is_resolved.

We leave in place a couple of sites where the `startsWith` is
entangled with other string manipulation.  We'll handle those next.
This commit is contained in:
Greg Price
2022-03-07 13:59:56 -08:00
committed by Tim Abbott
parent 624cdb0a14
commit 7bf0fd3fa3
8 changed files with 31 additions and 8 deletions

View File

@@ -178,7 +178,7 @@ export function warn_if_topic_resolved() {
const sub = stream_data.get_sub(stream_name);
if (sub && topic_name.startsWith(resolved_topic.RESOLVED_TOPIC_PREFIX)) {
if (sub && resolved_topic.is_resolved(topic_name)) {
const error_area = $("#compose_resolved_topic");
if (error_area.html()) {