From 61371868ad7c5f66bfb5e716abb3e2d35625bcae Mon Sep 17 00:00:00 2001 From: evykassirer Date: Tue, 28 May 2024 12:46:23 -0700 Subject: [PATCH] message_store: Mark optional attributes as optional. These aren't set when the Message object is first created and only used within `message_list_view`, so they should be optional. --- web/src/message_store.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/web/src/message_store.ts b/web/src/message_store.ts index b5b1e5090d..e816f999b8 100644 --- a/web/src/message_store.ts +++ b/web/src/message_store.ts @@ -121,9 +121,11 @@ export type Message = ( sent_by_me: boolean; reply_to: string; - // These properties are used in `message_list_view.js`. - message_reactions: MessageCleanReaction[]; - url: string; + // These properties are set and used in `message_list_view.js`. + // TODO: It would be nice if we could not store these on the message + // object and only reference them within `message_list_view`. + message_reactions?: MessageCleanReaction[]; + url?: string; // Used in `markdown.js`, `server_events.js`, and `set_message_booleans` flags?: string[];