mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
message_cache: Use the sender’s recipient_id for incoming 1:1 DMs.
For an incoming 1:1 DM, the recipient’s own recipient_id is useless to the recipient themselves. Substitute the sender’s recipient_id, so the recipient can use recipient_id as documented to uniquely represent the set of 2 users in this conversation. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
6ef0f0c072
commit
e2d56db2a3
@@ -253,7 +253,13 @@ def messages_for_ids(
|
||||
msg_dict["can_access_sender"] = msg_dict["sender_id"] not in inaccessible_sender_ids
|
||||
message_list.append(msg_dict)
|
||||
|
||||
MessageDict.post_process_dicts(message_list, apply_markdown, client_gravatar, realm)
|
||||
MessageDict.post_process_dicts(
|
||||
message_list,
|
||||
apply_markdown=apply_markdown,
|
||||
client_gravatar=client_gravatar,
|
||||
realm=realm,
|
||||
user_recipient_id=None if user_profile is None else user_profile.recipient_id,
|
||||
)
|
||||
|
||||
return message_list
|
||||
|
||||
|
||||
Reference in New Issue
Block a user