mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 06:53:25 +00:00
direct_messages: Use DM groups for 1:1 or self DMs if present.
This is a preparatory refactor for migrating the internal structure of Recipient objects for group DMs to use the DirectMessageGroup type, not the legacy PERSONAL type. This step has the message-sending code path check if a DirectMessageGroupe exists and prefer it if available. It should have no effect in production other than doing a useless database query for each outgoing DM, since we do not at present ever create such DirectMessageGroup objects. (It will not add a marginal database query once the migration is complete, just during this transition).
This commit is contained in:
committed by
Tim Abbott
parent
e5db9614eb
commit
a0488715f3
@@ -1176,7 +1176,7 @@ Output:
|
||||
read_by_sender: bool = True,
|
||||
) -> int:
|
||||
to_user_ids = [u.id for u in to_users]
|
||||
assert len(to_user_ids) >= 2
|
||||
assert len(to_user_ids) >= 1
|
||||
|
||||
(sending_client, _) = Client.objects.get_or_create(name="test suite")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user