Fix 2499d7b to not break user registration.

Some bots created by us do not have owners. Don't try to send a
message to the nonexistent owner.

(imported from commit ab952eccd7d6c4728e9477a106142214b5c81ca9)
This commit is contained in:
Kevin Mehall
2013-09-19 11:54:44 -04:00
parent 0da1d974bd
commit 6695105bb9

View File

@@ -449,7 +449,7 @@ def check_message(sender, client, message_type_name, message_to,
stream = get_stream(stream_name, realm) stream = get_stream(stream_name, realm)
if sender.is_bot: if sender.is_bot and sender.bot_owner is not None:
if stream: if stream:
num_subscribers = len(maybe_get_subscriber_emails(stream)) num_subscribers = len(maybe_get_subscriber_emails(stream))