refactor: Pass stream_ids to is_subscriber_subset.

After this change all peer_data functions consistently
use stream_id rather than some "sub" object whose
data type is complicated by all sort of fields that
don't really concern how we track subscribers.
This commit is contained in:
Steve Howell
2021-01-13 21:13:59 +00:00
committed by Tim Abbott
parent 355f44ef13
commit 2382fa7a19
3 changed files with 3 additions and 6 deletions

View File

@@ -981,7 +981,7 @@ exports.warn_if_private_stream_is_linked = function (linked_stream) {
return;
}
if (peer_data.is_subscriber_subset(compose_stream, linked_stream)) {
if (peer_data.is_subscriber_subset(compose_stream.stream_id, linked_stream.stream_id)) {
// Don't warn if subscribers list of current compose_stream is
// a subset of linked_stream's subscribers list, because
// everyone will be subscribed to the linked stream and so