signups: Move logic for realm admin notification to corporate app.

As we would like to send similar notifications for other billing
state changes (for all BillingSession types), it makes sense to
move the logic for creating and sending these admin realm internal
messages to the BillingSession framework in the corporate app.

In the case that a channel with the specified name does not exist,
we now send direct messages to the admin realm administrators with
the channel, topic and message so that the information is not lost
and so that the channel for these messages can be created.
This commit is contained in:
Lauryn Menard
2024-11-04 19:00:48 +01:00
committed by Tim Abbott
parent 9a40319bfc
commit 3ebc507ddb
3 changed files with 41 additions and 40 deletions

View File

@@ -835,11 +835,6 @@ def get_stream_by_narrow_operand_access_unchecked(operand: str | int, realm: Rea
return get_stream_by_id_in_realm(operand, realm)
def get_signups_stream(realm: Realm) -> Stream:
# This one-liner helps us work around a lint rule.
return get_stream("signups", realm)
def ensure_stream(
realm: Realm,
stream_name: str,