message edit: Fix bug preventing messages from being edited.

More context in this thread on CZO:
https://chat.zulip.org/#narrow/stream/9-issues/topic/Blueslip.20error.20on.20editing.20a.20message/near/1943476
This commit is contained in:
evykassirer
2024-09-17 14:06:48 -07:00
committed by Tim Abbott
parent c34913b4d7
commit 13e3ced486

View File

@@ -1696,6 +1696,10 @@ export class MessageListView {
// call; it was introduced in an earlier version of this code
// where we constructed an artificial message group for this
// rerendering rather than looking up the original version.
const preserved_properties = {
message_group_id: group.message_group_id,
message_containers: group.message_containers,
};
Object.assign(
group,
populate_group_from_message(
@@ -1703,6 +1707,10 @@ export class MessageListView {
group.date_unchanged,
undefined,
),
// We don't want `populate_group_from_message` to generate a
// new id. We also preserve the message containers, since this
// function doesn't generate new ones.
preserved_properties,
);
const $rendered_recipient_row = $(render_recipient_row(group));