mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 21:43:21 +00:00
bots: Compute embedded bots list using bot_dicts.
This commit is contained in:
@@ -4721,9 +4721,9 @@ def get_service_dicts_for_bots(bot_dicts: List[Dict[str, Any]],
|
||||
bot_profiles = user_ids_to_users(bot_profile_ids, realm) # type: List[UserProfile]
|
||||
bot_services_by_uid = get_services_for_bots(bot_profiles)
|
||||
|
||||
embedded_bot_profiles = [profile for profile in bot_profiles
|
||||
if profile.bot_type == UserProfile.EMBEDDED_BOT]
|
||||
embedded_bot_configs = get_bot_configs([bot_profile.id for bot_profile in embedded_bot_profiles])
|
||||
embedded_bot_ids = [bot_dict['id'] for bot_dict in bot_dicts
|
||||
if bot_dict['bot_type'] == UserProfile.EMBEDDED_BOT]
|
||||
embedded_bot_configs = get_bot_configs(embedded_bot_ids)
|
||||
|
||||
service_dicts_by_uid = {} # type: Dict[int, List[Dict[Text, Any]]]
|
||||
for bot_profile in bot_profiles:
|
||||
|
||||
Reference in New Issue
Block a user