From ef3fbfeb987bd52a4e330b7366aeda772cc4d52b Mon Sep 17 00:00:00 2001 From: Vishnu Ks Date: Wed, 16 Jan 2019 14:03:17 +0530 Subject: [PATCH] events: Include realm_plan_type in initial state data. --- zerver/lib/events.py | 1 + zerver/tests/test_home.py | 1 + 2 files changed, 2 insertions(+) diff --git a/zerver/lib/events.py b/zerver/lib/events.py index 8d70a380c6..35c4a5133e 100644 --- a/zerver/lib/events.py +++ b/zerver/lib/events.py @@ -202,6 +202,7 @@ def fetch_initial_state_data(user_profile: UserProfile, state['realm_password_auth_enabled'] = password_auth_enabled(realm) state['realm_push_notifications_enabled'] = push_notifications_enabled() state['realm_upload_quota'] = realm.upload_quota_bytes() + state['realm_plan_type'] = realm.plan_type if realm.notifications_stream and not realm.notifications_stream.deactivated: notifications_stream = realm.notifications_stream diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index 600962d432..38ceca87b4 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -164,6 +164,7 @@ class HomeTest(ZulipTestCase): "realm_non_active_users", "realm_notifications_stream_id", "realm_password_auth_enabled", + "realm_plan_type", "realm_presence_disabled", "realm_push_notifications_enabled", "realm_send_welcome_emails",