mirror of https://github.com/zulip/zulip.git
stream: Allow new bot to send message if its owner is full member.
We currently not allow new bots to send message in stream with post policy as 'STREAM_POST_POLICY_RESTRICT_NEW_MEMBERS', but we should allow them to send messages if their owner is a full member. This will make it consistent with behavior in stream with post policy as 'STREAM_POST_POLICY_ADMINS_ONLY' where we allow non admin bots with owner as admin to send messages.
This commit is contained in:
parent
3df87d0901
commit
81ae29d461
|
@ -207,7 +207,7 @@ def access_stream_for_send_message(
|
|||
elif stream.stream_post_policy == Stream.STREAM_POST_POLICY_RESTRICT_NEW_MEMBERS:
|
||||
if sender.is_bot and (sender.bot_owner is None or sender.bot_owner.is_new_member):
|
||||
raise JsonableError(_("New members cannot send to this stream."))
|
||||
elif sender.is_new_member:
|
||||
elif not sender.is_bot and sender.is_new_member:
|
||||
raise JsonableError(_("New members cannot send to this stream."))
|
||||
|
||||
if stream.is_web_public:
|
||||
|
|
Loading…
Reference in New Issue