settings: Add a new topics_policy realm setting.

Added a new realm setting, `topics_policy` and deprecated
`mandatory_topics` setting as it now replaced by `topics_policy`.

Fixes part of #33549.
This commit is contained in:
Vector73
2025-06-14 11:19:57 +00:00
committed by Tim Abbott
parent 8fb1eeeb09
commit 62c67eae8e
38 changed files with 313 additions and 57 deletions

View File

@@ -114,13 +114,13 @@ run_test("want_normal_display", ({override}) => {
// Focused recipient is a valid stream with no topic set
// when topics are mandatory
override(realm, "realm_mandatory_topics", true);
override(realm, "realm_topics_policy", "disable_empty_topic");
stream_data.add_sub(sub);
assert.ok(compose_fade_helper.want_normal_display());
// Focused recipient is a valid stream with no topic set
// when topics are not mandatory. Focused to input box.
override(realm, "realm_mandatory_topics", false);
override(realm, "realm_topics_policy", "allow_empty_topic");
assert.ok(compose_fade_helper.want_normal_display());
// If we're focused to a topic, then we do want to fade.