message: Differentiate between new local messages and server messages.

This commit is contained in:
Evy Kassirer
2025-09-02 14:10:58 -07:00
committed by Tim Abbott
parent 80b9cffb3d
commit 3c4fe73470
17 changed files with 348 additions and 140 deletions

View File

@@ -147,7 +147,10 @@ function process_result(data: MessageFetchResponse, opts: MessageFetchOptions):
const raw_messages = data.messages;
const messages = raw_messages.map((raw_message) =>
message_helper.process_new_message(raw_message),
message_helper.process_new_message({
type: "server_message",
raw_message,
}),
);
const has_found_oldest = opts.msg_list?.data.fetch_status.has_found_oldest() ?? false;
const has_found_newest = opts.msg_list?.data.fetch_status.has_found_newest() ?? false;