do_create_realm: Use internal_send_message.

(imported from commit 92edff133d16f72cf954671392e413066fb22955)
This commit is contained in:
Tim Abbott 2013-03-08 14:56:30 -05:00
parent a6c461e3e0
commit f37c6e7a1a
1 changed files with 2 additions and 11 deletions

View File

@ -296,17 +296,8 @@ def do_create_realm(domain, replay=False):
log_event({"type": "realm_created",
"domain": domain})
# Sent a notification message
message = Message()
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)
internal_send_message("humbug+signups@humbughq.com", Recipient.STREAM,
"signups", domain, "Signups enabled.")
return (realm, created)
def do_change_enable_desktop_notifications(user_profile, enable_desktop_notifications, log=True):