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.

notification-bot: Update message for approved full sponsorship.

Lauryn Menard6b2d531dfd71
diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py
index a420197d579..5ed4816f7f5 100644
--- a/corporate/lib/stripe.py
+++ b/corporate/lib/stripe.py
@@ -1007,8 +1007,10 @@ def approve_sponsorship(realm: Realm, *, acting_user: Optional[UserProfile]) ->
plan_name = "Zulip Cloud Standard"
emoji = ":tada:"
message = _(
- f"Your organization's request for sponsored hosting has been approved! {emoji}.\n"
- f"You have been upgraded to {plan_name}, free of charge."
+ "Your organization's request for sponsored hosting has been approved! "
+ f"You have been upgraded to {plan_name}, free of charge. {emoji}\n\n"
+ "If you could [list Zulip as a sponsor on your website](/help/linking-to-zulip-website), "
+ "we would really appreciate it!"
)
internal_send_private_message(notification_bot, user, message)
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index 656d7c7e8ae..33289b1f79b 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -2530,7 +2530,10 @@ class StripeTest(StripeTestCase):
realm = get_realm("zulip")
self.assertEqual(realm.plan_type, Realm.PLAN_TYPE_STANDARD_FREE)
- expected_message = "Your organization's request for sponsored hosting has been approved! :tada:.\nYou have been upgraded to Zulip Cloud Standard, free of charge."
+ expected_message = (
+ "Your organization's request for sponsored hosting has been approved! You have been upgraded to Zulip Cloud Standard, free of charge. :tada:"
+ "\n\nIf you could [list Zulip as a sponsor on your website](/help/linking-to-zulip-website), we would really appreciate it!"
+ )
sender = get_system_bot(settings.NOTIFICATION_BOT, user.realm_id)
recipient_id = self.example_user("desdemona").recipient_id
message = Message.objects.filter(sender=sender.id).first()