Commit Graph

39 Commits

Author SHA1 Message Date
Evy Kassirer
d3ef72f1d6 message: Remove unused recipient_id.
I confirmed this isn't used in any .hbs templates, so
it doesn't seem to be being used anywhere.
2025-09-09 09:20:40 -07:00
Anders Kaseorg
a29ed94e5b web: Switch to Zod mini API.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-07-21 16:40:17 -07:00
Sahil Batra
52b20354e6 message_view: Live update on losing access to a stream.
This commit adds code to live update the message view when
user loses access to a stream and also remove the data of
messages from that stream.
2025-04-29 09:46:19 -07:00
Lauryn Menard
0f5246400b message-edit: Use last_moved_timestamp for edited/moved indicators.
Use both the last_moved_timestamp and last_edit_timestamp to show
edited and moved indicators/tooltips in the message list view of
the web app, instead of parsing the message edit history array.

We still maintain and build the message edit history array as it's
used for calculating the narrow terms when there is a near operator
and a message has been moved to a different channel or topic.

Updates the tooltip for message edit indicators to include both
the moved and edited time if a message has been both moved and
edited.
2025-03-11 16:42:28 -07:00
Anders Kaseorg
d446b0d672 user_events: Convert module to TypeScript (#32658) 2024-12-11 09:18:52 -08:00
evykassirer
7bd4016254 message_events: Convert module to typescript. 2024-12-10 10:52:01 -08:00
Anders Kaseorg
ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
evykassirer
471d042a11 message_notifications: Convert module to typescript. 2024-09-30 12:07:27 -07:00
evykassirer
e41e365085 message_list_view: Convert module to typescript. 2024-09-11 14:59:31 -07:00
Prakhar Pratyush
656c65c74c edit_history: Remove 'prev_rendered_content_version' field.
This commit removes the 'prev_rendered_content_version'
field from:

* the 'edit_history' object within message objects in the
API response of `GET /messages`, `GET /messages/{message_id}`
and `POST /zulip-outgoing-webhook`.
* the 'update_message' event type

as it is an internal server implementation detail not used
by any client.

Note: The field is still stored in the 'edit_history' column
of the 'Message' table as it will be helpful when making
major changes to the markup rendering process.
2024-08-29 15:37:12 -07:00
Pratik Chanda
54a7cefede message_store: Fix order of group full names of pm recipients.
Earlier, in group direct message, the full names of group pm recipients
were sorted incorrectly which is used for tooltip on hovering over
recipient row and text placeholder of collapsed compose box. That
resulted in different order of recipient names.

This commit fixes the behaviour by using the `make_strcmp` to sort
the names to show in the tooltip and collapsed compose box.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
afeefuddin
17e2d46760 message_store: Rewrite RawMessage type using Zod.
This commit rework RawMessage and it's related type to use
Zod for parsing the data received from the server.
2024-08-23 13:34:13 -07:00
evykassirer
b1198785be message_edit: Convert module to typescript. 2024-08-19 16:33:04 -07:00
Varun Singh
d8dd682944 echo: Convert module to TypeScript. 2024-08-13 09:37:35 -07:00
Varun Singh
2e12d3cd25 user: Drop is_mirror_dummy field from 'user' object. 2024-08-13 09:37:35 -07:00
Varun Singh
126d4fb137 echo: Remove support for zephyr mirroring. 2024-08-13 09:37:35 -07:00
Aman Agrawal
d381a358d0 message_events: Remove message from message_store on deletion.
We did not remove the deleted messages from message_store
previously. This commit adds the code to remove the deleted
messages from message_store.

Co-authored-by: Sahil Batra <sahil@zulip.com>
2024-06-27 14:59:45 -07:00
evykassirer
9a3263ec5d messages: Rename convert_raw_message_to_message_with_booleans. 2024-06-03 15:42:41 -07:00
Anders Kaseorg
ec199082fd types: Move Submessage to submessage.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-29 17:47:09 -07:00
evykassirer
48fc0bc750 message_helper: Convert module to typescript. 2024-05-29 16:45:36 -07:00
evykassirer
7364c02ed6 message_helper: Set clean reactions when processing the raw message. 2024-05-29 16:45:36 -07:00
evykassirer
50f5cf9ad8 message booleans: Return new message instead of mutating a raw message. 2024-05-29 16:45:36 -07:00
evykassirer
59a743de01 reify_message_id: Save id on most up-to-date message object.
Previously we relied on `echo.reify_message_id` to set the new
`id` and `locally_echoed` value, but it was setting this on
the message stored in `waiting_for_id`, which isn't guaranteed
to be the same as the message in the message store. Once
`process_new_message` stops mutating the message it gets and
returns a new message object, this would have caused a bug.
2024-05-29 16:45:36 -07:00
evykassirer
61371868ad 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.
2024-05-29 16:45:36 -07:00
evykassirer
854b3868ac message: Remove unused star_status attribute.
Based on git log -S 'starred_status', it’s been unused since
4bf16ca9cc (#22746).
2024-05-29 16:45:36 -07:00
evykassirer
7a9a445088 emoji: Restrict reaction_type for compatibility with typeahead.Emoji. 2024-05-16 14:51:28 -07:00
Anders Kaseorg
507eb4913c tsconfig: Enable exactOptionalPropertyTypes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-16 08:58:20 -07:00
evykassirer
d4d57193df message_store: Clarify display_reply_to type for stream/dm messages. 2024-05-13 12:51:00 -07:00
evykassirer
28c13f6d0e message_store: Modify get_pm_full_names to only take user ids.
This will let us properly call it from compose_closed_ui without
a full message object, which we need to convert it to typescript.
2024-05-12 17:41:22 -07:00
Anders Kaseorg
d507706371 zulip_test: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:55:17 -07:00
Anders Kaseorg
fb7bad235d message_store: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg
4340f400b8 message_store: Fix bogus update_status_emoji_info type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Anders Kaseorg
7a10d8329b message_store: Fix get_cached_message type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-03 15:39:55 -07:00
Temidayo32
42dd55df42 condense: Convert module to Typescript. 2024-03-07 16:15:30 -08:00
evykassirer
fb7d77545f reactions: Convert module to typescript. 2024-03-04 19:07:49 -08:00
evykassirer
e4ba07dcf2 message_store: Only allow number for message_id. 2024-01-19 17:54:07 -08:00
evykassirer
08bee0f180 message flags: Convert module to typescript. 2024-01-02 16:48:45 -08:00
Anders Kaseorg
3d55e7ef10 eslint: Fix @typescript-eslint/prefer-nullish-coalescing.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-12-23 15:36:05 -08:00
evykassirer
24dc2e783d message_store: Migrate message_store to typescript. 2023-12-17 09:43:47 -08:00