diff --git a/corporate/lib/support.py b/corporate/lib/support.py
index f0d4b67373..4078c87d00 100644
--- a/corporate/lib/support.py
+++ b/corporate/lib/support.py
@@ -11,9 +11,11 @@ from django.utils.timezone import now as timezone_now
from corporate.lib.stripe import (
BillingSession,
+ PushNotificationsEnabledStatus,
RemoteRealmBillingSession,
RemoteServerBillingSession,
get_configured_fixed_price_plan_offer,
+ get_push_status_for_remote_request,
start_of_next_billing_cycle,
)
from corporate.models import (
@@ -86,6 +88,7 @@ class PlanData:
@dataclass
class MobilePushData:
total_mobile_users: int
+ push_notification_status: PushNotificationsEnabledStatus
uncategorized_mobile_users: Optional[int] = None
mobile_pushes_forwarded: Optional[int] = None
last_mobile_push_sent: str = ""
@@ -304,8 +307,12 @@ def get_mobile_push_data(remote_entity: Union[RemoteZulipServer, RemoteRealm]) -
).strftime("%Y-%m-%d")
else:
push_forwarded_interval_start = "None"
+ push_notification_status = get_push_status_for_remote_request(
+ remote_server=remote_entity, remote_realm=None
+ )
return MobilePushData(
total_mobile_users=total_users,
+ push_notification_status=push_notification_status,
uncategorized_mobile_users=uncategorized_users,
mobile_pushes_forwarded=mobile_pushes["total_forwarded"],
last_mobile_push_sent=push_forwarded_interval_start,
@@ -334,8 +341,12 @@ def get_mobile_push_data(remote_entity: Union[RemoteZulipServer, RemoteRealm]) -
).strftime("%Y-%m-%d")
else:
push_forwarded_interval_start = "None"
+ push_notification_status = get_push_status_for_remote_request(
+ remote_entity.server, remote_entity
+ )
return MobilePushData(
total_mobile_users=mobile_users,
+ push_notification_status=push_notification_status,
uncategorized_mobile_users=None,
mobile_pushes_forwarded=mobile_pushes["total_forwarded"],
last_mobile_push_sent=push_forwarded_interval_start,
diff --git a/corporate/tests/test_support_views.py b/corporate/tests/test_support_views.py
index f0ad1f4705..50091a0ea1 100644
--- a/corporate/tests/test_support_views.py
+++ b/corporate/tests/test_support_views.py
@@ -174,6 +174,7 @@ class TestRemoteServerSupportEndpoint(ZulipTestCase):
"Plan type: Free
",
"Non-guest user count: 0
",
"Guest user count: 0
",
+ "📶 Push notification status:",
],
html_response,
)
@@ -190,6 +191,7 @@ class TestRemoteServerSupportEndpoint(ZulipTestCase):
"Date created: 01 December 2023",
"Org type: Unspecified
",
"Has remote realms: True
",
+ "📶 Push notification status:",
],
html_response,
)
diff --git a/templates/corporate/support/push_status_details.html b/templates/corporate/support/push_status_details.html
new file mode 100644
index 0000000000..e0df02be48
--- /dev/null
+++ b/templates/corporate/support/push_status_details.html
@@ -0,0 +1,6 @@
+
📶 Push notification status:
+ Can push: {{ status.can_push }}