mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Introduce client_message_id on the server.
We are deprecating local_id/local_message_id on the Python server.
Instead of the server knowing about the client's implementation of
local id, with the message id = 9999.01 scheme, we just send the
server an opaque id to send back to us.
This commit changes the name from local_id -> client_message_id,
but it doesn't change the actual values passed yet.
The goal for client_key in future commits will be to:
* Have it for all messages, not just locally rendered messages
* Not have it overlap with server-side message ids.
The history behind local_id having numbers like 9999.01 is that
they are actually interim message ids and the numerical value is
used for rendering the message list when we do client-side rendering.
This commit is contained in:
@@ -302,6 +302,13 @@ exports.send_message_success = function (local_id, message_id, start_time, local
|
||||
};
|
||||
|
||||
exports.transmit_message = function (request, success, error) {
|
||||
// Give the server our local_id as client_message_id. We
|
||||
// will eventually decouple these concepts, so that local_id
|
||||
// is only an interim value for a message id, whereas
|
||||
// client_message_id will be a key used to track the message through
|
||||
// its lifecycle of being posted/received/acked/sent/displayed.
|
||||
request.client_message_id = request.local_id;
|
||||
|
||||
delete exports.send_times_data[request.id];
|
||||
if (page_params.use_websockets) {
|
||||
send_message_socket(request, success, error);
|
||||
|
||||
Reference in New Issue
Block a user