mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 12:33:40 +00:00
group-pms: Update list when new group pm is made.
The function activity.process_loaded_messages(messages) would be called from message_events.js, this would call people.huddle_string with the same message object, it was expected that this would return a list of ids but the message.display_recipient attribute which was being sent here used a "user_id" field instead of an "id" field. Fixes: #12503.
This commit is contained in:
@@ -83,11 +83,24 @@ function insert_local_message(message_request, local_id) {
|
||||
var person = people.get_by_email(email);
|
||||
if (person === undefined) {
|
||||
// For unknown users, we return a skeleton object.
|
||||
return {email: email, full_name: email,
|
||||
unknown_local_echo_user: true};
|
||||
return {
|
||||
email: email,
|
||||
full_name: email,
|
||||
unknown_local_echo_user: true,
|
||||
};
|
||||
}
|
||||
|
||||
// NORMAL PATH
|
||||
return person;
|
||||
//
|
||||
// This should match the format of display_recipient
|
||||
// objects generated by the backend code in models.py,
|
||||
// which is why we create a new object with a `.id` field
|
||||
// rather than a `.user_id` field.
|
||||
return {
|
||||
id: person.user_id,
|
||||
email: person.email,
|
||||
full_name: person.full_name,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user