Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

settings: Fix setting JITSI_SERVER_URL to None.

Tim Abbott3b181968aaf1
diff --git a/zerver/lib/events.py b/zerver/lib/events.py
index 29f280679cd..32c1348ed9f 100644
--- a/zerver/lib/events.py
+++ b/zerver/lib/events.py
@@ -235,7 +235,6 @@ def fetch_initial_state_data(
state["zulip_plan_is_not_limited"] = realm.plan_type != Realm.LIMITED
state["upgrade_text_for_wide_organization_logo"] = str(Realm.UPGRADE_TEXT_STANDARD)
state["realm_default_external_accounts"] = DEFAULT_EXTERNAL_ACCOUNTS
- state["jitsi_server_url"] = settings.JITSI_SERVER_URL.rstrip("/")
state["development_environment"] = settings.DEVELOPMENT
state["server_generation"] = settings.SERVER_GENERATION
state["password_min_length"] = settings.PASSWORD_MIN_LENGTH
@@ -248,6 +247,11 @@ def fetch_initial_state_data(
state["server_name_changes_disabled"] = settings.NAME_CHANGES_DISABLED
state["giphy_rating_options"] = realm.GIPHY_RATING_OPTIONS
+ if settings.JITSI_SERVER_URL is not None:
+ state["jitsi_server_url"] = settings.JITSI_SERVER_URL.rstrip("/")
+ else: # nocoverage
+ state["jitsi_server_url"] = None
+
if realm.notifications_stream and not realm.notifications_stream.deactivated:
notifications_stream = realm.notifications_stream
state["realm_notifications_stream_id"] = notifications_stream.id