mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 19:06:09 +00:00
bots: Do not show not_subscribed warning for bots on private streams.
Fixes #9373. `not_subscribed` warning is not shown for bots on either private or public streams. Some of the bots have an interface such that they receive the message mentioning them even if on a private stream where they are not subscribed.
This commit is contained in:
committed by
Tim Abbott
parent
2e6d04797a
commit
bdda920e0b
@@ -711,7 +711,7 @@ exports.needs_subscribe_warning = function (email) {
|
|||||||
// * the stream in the compose box is valid
|
// * the stream in the compose box is valid
|
||||||
// * the user is not already subscribed to the stream
|
// * the user is not already subscribed to the stream
|
||||||
// * the user has no back-door way to see stream messages
|
// * the user has no back-door way to see stream messages
|
||||||
// (i.e. bots on public streams)
|
// (i.e. bots on public/private streams)
|
||||||
//
|
//
|
||||||
// You can think of this as roughly answering "is there an
|
// You can think of this as roughly answering "is there an
|
||||||
// actionable way to subscribe the user and do they actually
|
// actionable way to subscribe the user and do they actually
|
||||||
@@ -733,8 +733,8 @@ exports.needs_subscribe_warning = function (email) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.is_bot && !sub.invite_only) {
|
if (user.is_bot) {
|
||||||
// Bots may receive messages on public streams even if they are
|
// Bots may receive messages on public/private streams even if they are
|
||||||
// not subscribed.
|
// not subscribed.
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user