Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
direct_message_group: Add assertion to ensure unique user IDs.
Mohammad Reza Kianifar40a69f975771
diff --git a/zerver/models/recipients.py b/zerver/models/recipients.pyindex ab18c916877..1c5ef3bf32f 100644--- a/zerver/models/recipients.py+++ b/zerver/models/recipients.py@@ -153,6 +153,7 @@ def get_or_create_direct_message_group(id_list: list[int]) -> DirectMessageGroup"""from zerver.models import Subscription, UserProfile+ assert len(id_list) == len(set(id_list))direct_message_group_hash = get_direct_message_group_hash(id_list)with transaction.atomic(savepoint=False):(direct_message_group, created) = DirectMessageGroup.objects.get_or_create(