mirror of
https://github.com/zulip/zulip.git
synced 2025-11-11 17:36:27 +00:00
do_create_realm: Use internal_send_message.
(imported from commit 92edff133d16f72cf954671392e413066fb22955)
This commit is contained in:
@@ -296,17 +296,8 @@ def do_create_realm(domain, replay=False):
|
|||||||
log_event({"type": "realm_created",
|
log_event({"type": "realm_created",
|
||||||
"domain": domain})
|
"domain": domain})
|
||||||
|
|
||||||
# Sent a notification message
|
internal_send_message("humbug+signups@humbughq.com", Recipient.STREAM,
|
||||||
message = Message()
|
"signups", domain, "Signups enabled.")
|
||||||
message.sender = UserProfile.objects.get(user__email__iexact="humbug+signups@humbughq.com")
|
|
||||||
stream, _ = create_stream_if_needed(message.sender.realm, "signups")
|
|
||||||
message.recipient = Recipient.objects.get(type_id=stream.id, type=Recipient.STREAM)
|
|
||||||
message.subject = domain
|
|
||||||
message.content = "Signups enabled."
|
|
||||||
message.pub_date = timezone.now()
|
|
||||||
message.sending_client = get_client("Internal")
|
|
||||||
|
|
||||||
do_send_message(message)
|
|
||||||
return (realm, created)
|
return (realm, created)
|
||||||
|
|
||||||
def do_change_enable_desktop_notifications(user_profile, enable_desktop_notifications, log=True):
|
def do_change_enable_desktop_notifications(user_profile, enable_desktop_notifications, log=True):
|
||||||
|
|||||||
Reference in New Issue
Block a user