mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
get_recipient_ids: Include user ID for self-messages using DM group.
When using direct message groups as the preferred method for 1:1 or self-messages, the get_recipient_ids function should include the user ID for self-messages. Without this, the UI cannot detect who was the recipient of the message.
This commit is contained in:
committed by
Tim Abbott
parent
2671aff7c3
commit
e2d1c233ba
@@ -249,8 +249,9 @@ def get_recipient_ids(
|
||||
to = [recipient.type_id]
|
||||
else:
|
||||
to = []
|
||||
for r in get_display_recipient(recipient):
|
||||
recipients = get_display_recipient(recipient)
|
||||
for r in recipients:
|
||||
assert not isinstance(r, str) # It will only be a string for streams
|
||||
if r["id"] != user_profile_id:
|
||||
if r["id"] != user_profile_id or len(recipients) == 1:
|
||||
to.append(r["id"])
|
||||
return to, recipient_type_str
|
||||
|
Reference in New Issue
Block a user