mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	minor: Remove peer_data.clear().
This commit is contained in:
		@@ -2,7 +2,7 @@ const {LazySet} = require("./lazy_set");
 | 
			
		||||
const people = require("./people");
 | 
			
		||||
 | 
			
		||||
// This maps a stream_id to a LazySet of user_ids who are subscribed.
 | 
			
		||||
let stream_subscribers;
 | 
			
		||||
const stream_subscribers = new Map();
 | 
			
		||||
 | 
			
		||||
function assert_number(id) {
 | 
			
		||||
    if (typeof id !== "number") {
 | 
			
		||||
@@ -29,10 +29,6 @@ function get_user_set(stream_id) {
 | 
			
		||||
    return subscribers;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function clear() {
 | 
			
		||||
    stream_subscribers = new Map();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function is_subscriber_subset(stream_id1, stream_id2) {
 | 
			
		||||
    const sub1_set = get_user_set(stream_id1);
 | 
			
		||||
    const sub2_set = get_user_set(stream_id2);
 | 
			
		||||
 
 | 
			
		||||
@@ -140,7 +140,6 @@ exports.clear_subscriptions = function () {
 | 
			
		||||
    // it should only be used in tests.
 | 
			
		||||
    stream_info = new BinaryDict((sub) => sub.subscribed);
 | 
			
		||||
    subs_by_stream_id = new Map();
 | 
			
		||||
    peer_data.clear();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.clear_subscriptions();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user