Revert commits related to client_message_id.

I pushed a bunch of commits that attempted to introduce
the concept of `client_message_id` into our server, as
part of cleaning up our codepaths related to messages you
sent (both for the locally echoed case and for the host
case).

When we deployed this, we had some strange failures involving
double-echoed messages and issues advancing the pointer that appeared
related to #5779.  We didn't get to the bottom of exactly why the PR
caused havoc, but I decided there was a cleaner approach, anyway.
This commit is contained in:
Steve Howell
2017-07-14 13:30:23 -04:00
committed by Tim Abbott
parent d3cce041a4
commit 475eb21a5e
18 changed files with 203 additions and 360 deletions

View File

@@ -13,16 +13,14 @@ function resend_message(message, row) {
// Always re-set queue_id if we've gotten a new one
// since the time when the message object was initially created
message.queue_id = page_params.queue_id;
var start_time = new Date();
compose.transmit_message(message, function success(data) {
retry_spinner.toggleClass('rotating', false);
var message_id = data.id;
retry_spinner.toggleClass('rotating', false);
var locally_echoed = true;
compose.send_message_success(message.local_id, message_id, locally_echoed);
compose.send_message_success(message.local_id, message_id, start_time, true);
// Resend succeeded, so mark as no longer failed
message_store.get(message_id).failed_request = false;
@@ -173,14 +171,11 @@ exports.process_from_server = function process_from_server(messages) {
if (client_message.content !== message.content) {
client_message.content = message.content;
updated = true;
sent_messages.mark_rendered_content_disparity({
client_message_id: message.client_message_id,
changed: true,
});
compose.mark_rendered_content_disparity(message.id, true);
}
msgs_to_rerender.push(client_message);
locally_processed_ids.push(client_message.id);
sent_messages.report_as_received(message.client_message_id);
compose.report_as_received(client_message);
delete waiting_for_ack[client_message.id];
return false;
}