billing: Make push notifications error message more clear.

This commit is contained in:
Alya Abbott 2024-02-16 10:20:02 -08:00 committed by Tim Abbott
parent 273453d285
commit 4f1659fe8f
2 changed files with 3 additions and 3 deletions

View File

@ -4924,7 +4924,7 @@ def get_push_status_for_remote_request(
return PushNotificationsEnabledStatus(
can_push=False,
expected_end_timestamp=None,
message="No plan many users",
message="Push notifications access with 10+ users requires signing up for a plan. https://zulip.com/plans/",
)
return PushNotificationsEnabledStatus(

View File

@ -859,7 +859,7 @@ class PushBouncerNotificationTest(BouncerTestCase):
)
self.assert_json_error(
result,
"Your plan doesn't allow sending push notifications. Reason provided by the server: No plan many users",
"Your plan doesn't allow sending push notifications. Reason provided by the server: Push notifications access with 10+ users requires signing up for a plan. https://zulip.com/plans/",
)
self.assertEqual(orjson.loads(result.content)["code"], "PUSH_NOTIFICATIONS_DISALLOWED")
@ -2781,7 +2781,7 @@ class HandlePushNotificationTest(PushNotificationTest):
pn_logger.output,
[
f"INFO:zerver.lib.push_notifications:Sending push notifications to mobile clients for user {self.user_profile.id}",
"WARNING:zerver.lib.push_notifications:Bouncer refused to send push notification: Your plan doesn't allow sending push notifications. Reason provided by the server: No plan many users",
"WARNING:zerver.lib.push_notifications:Bouncer refused to send push notification: Your plan doesn't allow sending push notifications. Reason provided by the server: Push notifications access with 10+ users requires signing up for a plan. https://zulip.com/plans/",
],
)
realm.refresh_from_db()