Webchat: Fix issue accessing msg.id

After the refactor of the messages object in webchat, we are sending
a direct json dict version of the packet now.  This means there is no
msg.id in the dict, but msg.msgNo instead.  This should help fix
the display of dupes.
This commit is contained in:
Hemna 2023-09-26 11:04:59 -04:00
parent 6b083d4c4d
commit d63c6854af
1 changed files with 3 additions and 3 deletions

View File

@ -353,7 +353,7 @@ function append_message_html(callsign, msg_html, new_callsign) {
}
function create_message_html(date, time, from, to, message, ack_id, msg, acked=false) {
div_id = from + "_" + msg.id;
div_id = from + "_" + msg.msgNo;
if (ack_id) {
alt = " alt"
} else {
@ -400,7 +400,7 @@ function create_message_html(date, time, from, to, message, ack_id, msg, acked=f
function flash_message(msg) {
// Callback function to bring a hidden box back
id = msg.from + "_" + msg.id;
id = msg.from + "_" + msg.msgNo;
var msgid = $('#'+id);
msgid.effect("pulsate", { times:3 }, 2000);
}
@ -423,7 +423,7 @@ function from_msg(msg) {
from_msg_list[msg.from_call] = new Array();
}
if (msg.id in from_msg_list[msg.from_call]) {
if (msg.msgNo in from_msg_list[msg.from_call]) {
// We already have this message
console.log("We already have this message " + msg);
// Do some flashy thing?