wildcard_mentions_notify: Add per-stream override of global setting.

Adds required API and front-end changes to modify and read the
wildcard_mentions_notify field in the Subscription model.

It includes front-end code to add the setting to the user's "manage
streams" page. This setting will be greyed out when a stream is muted.
The PR also includes back-end code to add the setting the initial state of
a subscription.

New automated tests were added for the API, events system and front-end.
In manual testing, we checked that modifying the setting in the front end
persisted the change in the Subscription model. We noticed the notifications
were not behaving exactly as expected in manual testing; see
https://github.com/zulip/zulip/issues/13073#issuecomment-560263081 .

Tweaked by tabbott to fix real-time synchronization issues.

Fixes: #13429.
This commit is contained in:
Nat1405
2019-11-25 17:37:12 -08:00
committed by Tim Abbott
parent 792fbeea24
commit d5f005fd61
11 changed files with 88 additions and 4 deletions

View File

@@ -50,6 +50,9 @@ exports.update_property = function (stream_id, property, value, other_values) {
history_public_to_subscribers: other_values.history_public_to_subscribers,
});
break;
case 'wildcard_mentions_notify':
update_stream_setting(sub, value, property);
break;
case 'is_announcement_only':
subs.update_stream_announcement_only(sub, value);
break;