From f7535a0a1bb1c3fe366f52d4140a9efcfb6d6ded Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Fri, 2 May 2014 15:30:16 -0700 Subject: [PATCH] Fix traceback sending bot messages to invite-only stream. (imported from commit b9af67e87d8b7d52bddb8fa576af8fe9326ba13c) --- zerver/lib/actions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 654556215f..d9b025c71c 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -716,7 +716,8 @@ def check_message(sender, client, message_type_name, message_to, elif subscribed_to_stream(sender, stream): # Or it is private, but your are subscribed pass - elif is_super_user(sender) or is_super_user(forwarder_user_profile): + elif is_super_user(sender) or (forwarder_user_profile is not None and + is_super_user(forwarder_user_profile)): # Or this request is being done on behalf of a super user pass elif sender.is_bot and subscribed_to_stream(sender.bot_owner, stream):