Add stream_data.id_is_subscribed().

We use this function in stream_list.js.
This commit is contained in:
Steve Howell
2017-05-14 07:32:18 -07:00
committed by Tim Abbott
parent efb35afeb7
commit 762194f98d
2 changed files with 20 additions and 10 deletions

View File

@@ -200,6 +200,11 @@ exports.is_subscribed = function (stream_name) {
return sub !== undefined && sub.subscribed;
};
exports.id_is_subscribed = function (stream_id) {
var sub = subs_by_stream_id.get(stream_id);
return sub !== undefined && sub.subscribed;
};
exports.get_invite_only = function (stream_name) {
var sub = exports.get_sub(stream_name);
if (sub === undefined) {