mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
message_edit_history: Use raw_data and data more.
Prefer using `raw_data` and `data` instead of `data` and `clean_data`.
This commit is contained in:
parent
f553142c7c
commit
3d64fb6cda
@ -115,12 +115,12 @@ export function fetch_and_render_message_history(message: Message): void {
|
||||
void channel.get({
|
||||
url: "/json/messages/" + message.id + "/history",
|
||||
data: {message_id: JSON.stringify(message.id)},
|
||||
success(data) {
|
||||
const clean_data = server_message_history_schema.parse(data);
|
||||
success(raw_data) {
|
||||
const data = server_message_history_schema.parse(raw_data);
|
||||
|
||||
const content_edit_history: EditHistoryEntry[] = [];
|
||||
let prev_stream_item: EditHistoryEntry | null = null;
|
||||
for (const [index, msg] of clean_data.message_history.entries()) {
|
||||
for (const [index, msg] of data.message_history.entries()) {
|
||||
// Format times and dates nicely for display
|
||||
const time = new Date(msg.timestamp * 1000);
|
||||
const edited_at_time = timerender.get_full_datetime(time, "time");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user