message_edit: Add debug logging for missing messages.

This is an attempt to more easily debug a traceback we've seen a few
times.  The issue likely has to do with local echo, which would be
confirmed if this reports a local-echo-style message ID.
This commit is contained in:
Tim Abbott 2017-08-27 16:10:55 -07:00
parent 90012f8109
commit a1885c6ffb
1 changed files with 5 additions and 0 deletions

View File

@ -330,6 +330,11 @@ function start_edit_with_content(row, content, edit_box_open_callback) {
exports.start = function (row, edit_box_open_callback) {
var message = current_msg_list.get(rows.id(row));
if (message === undefined) {
blueslip.error("Couldn't find message ID for edit " + rows.id(row));
return;
}
if (message.raw_content) {
start_edit_with_content(row, message.raw_content, edit_box_open_callback);
return;