mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 11:22:04 +00:00
bots: Do not remove bot from inaccessible streams on owner change.
See https://chat.zulip.org/#narrow/channel/101-design/topic/manage.20bot.20access.20feature.20removal
This commit is contained in:
committed by
Tim Abbott
parent
2c8d74735a
commit
e57c43b705
@@ -1735,23 +1735,6 @@ def do_get_streams(
|
||||
return stream_dicts
|
||||
|
||||
|
||||
def get_subscribed_private_streams_for_user(user_profile: UserProfile) -> QuerySet[Stream]:
|
||||
exists_expression = Exists(
|
||||
Subscription.objects.filter(
|
||||
user_profile=user_profile,
|
||||
active=True,
|
||||
is_user_active=True,
|
||||
recipient_id=OuterRef("recipient_id"),
|
||||
),
|
||||
)
|
||||
subscribed_private_streams = (
|
||||
Stream.objects.filter(realm=user_profile.realm, invite_only=True, deactivated=False)
|
||||
.alias(subscribed=exists_expression)
|
||||
.filter(subscribed=True)
|
||||
)
|
||||
return subscribed_private_streams
|
||||
|
||||
|
||||
def notify_stream_is_recently_active_update(stream: Stream, value: bool) -> None:
|
||||
event = dict(
|
||||
type="stream",
|
||||
|
||||
Reference in New Issue
Block a user