Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
import: Add TODO about improving how initial DMs are generated.
Mateusz Mandera71f1c5677aee
diff --git a/zerver/lib/import_realm.py b/zerver/lib/import_realm.pyindex 0b6a59edbb1..6ce9983c527 100644--- a/zerver/lib/import_realm.py+++ b/zerver/lib/import_realm.py@@ -1940,6 +1940,8 @@ def send_zulip_initial_messages_after_import(realm: Realm, target_channel: Strea# We use batching to avoid fetching a large number of UserProfile objects# in one go, if the realm is huge.+ # TODO: Instead, it would be much more efficient to just generate these messages+ # on the fly for each imported user during their first login.while user_profiles_batch := list(UserProfile.objects.filter(realm=realm, is_active=True, is_bot=False, id__gt=lower_bound_id