mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
settings: Add setting for SYSTEM_BOT_REALM.
This fixes some subtle JavaScript exceptions we've been getting in zulipchat.com, caused by the system bot realm there not being "zulip" interacting with get_cross_realm_users.
This commit is contained in:
@@ -3889,7 +3889,7 @@ def get_cross_realm_dicts():
|
||||
# type: () -> List[Dict[str, Any]]
|
||||
users = bulk_get_users(list(get_cross_realm_emails()), None,
|
||||
base_query=UserProfile.objects.filter(
|
||||
realm__string_id="zulip")).values()
|
||||
realm__string_id=settings.SYSTEM_BOT_REALM)).values()
|
||||
return [{'email': user.email,
|
||||
'user_id': user.id,
|
||||
'is_admin': user.is_realm_admin,
|
||||
@@ -3899,7 +3899,7 @@ def get_cross_realm_dicts():
|
||||
# Important: We filter here, is addition to in
|
||||
# `base_query`, because of how bulk_get_users shares its
|
||||
# cache with other UserProfile caches.
|
||||
if user.realm.string_id == 'zulip']
|
||||
if user.realm.string_id == settings.SYSTEM_BOT_REALM]
|
||||
|
||||
def do_send_confirmation_email(invitee, referrer, body):
|
||||
# type: (PreregistrationUser, UserProfile, Optional[str]) -> None
|
||||
|
||||
Reference in New Issue
Block a user