Add filter.is_stream_topic_only().

This commit is contained in:
Steve Howell
2018-05-02 11:23:30 +00:00
committed by Tim Abbott
parent 08307c0e87
commit 2a70f0dba4
2 changed files with 33 additions and 0 deletions

View File

@@ -411,6 +411,14 @@ Filter.prototype = {
return (term.operator === 'stream');
},
is_stream_topic_only: function () {
if (this._operators.length !== 2) {
return false;
}
return this.has_operator('stream') && this.has_operator('topic');
},
update_email: function (user_id, new_email) {
_.each(this._operators, function (term) {
switch (term.operator) {