home: Enable partial_subscribers in web app.

Fixed #34244.
This commit is contained in:
Tim Abbott
2025-07-15 17:46:45 -07:00
parent 55634c8fcc
commit 458c660f65
3 changed files with 5 additions and 5 deletions

View File

@@ -1,5 +1,4 @@
import calendar
import os
import time
from dataclasses import dataclass
from urllib.parse import urlsplit
@@ -110,7 +109,7 @@ def build_page_params_for_home_page_load(
if user_profile is not None:
client = RequestNotes.get_notes(request).client
assert client is not None
partial_subscribers = os.environ.get("PARTIAL_SUBSCRIBERS") is not None
partial_subscribers = True
state_data = do_events_register(
user_profile,
realm,

View File

@@ -898,8 +898,9 @@ def gather_subscriptions_helper(
}
# If the client only wants partial subscriber data, we send:
# - all subscribers (full data) for channels with fewer than 250 subscribers
# - only bots and recently active users for channels with >= 250 subscribers
# - all subscribers (full data) for channels with fewer than
# MIN_PARTIAL_SUBSCRIBERS_CHANNEL_SIZE subscribers.
# - only bots and recently active users for other channels.
streams_to_partially_fetch = []
if include_subscribers == "partial":
streams_to_partially_fetch = [

View File

@@ -741,4 +741,4 @@ SCIM_CONFIG: dict[str, SCIMConfigDict] = {}
# Minimum number of subscribers in a channel for us to no longer
# send full subscriber data to the client.
MIN_PARTIAL_SUBSCRIBERS_CHANNEL_SIZE = 250
MIN_PARTIAL_SUBSCRIBERS_CHANNEL_SIZE = 1000