mirror of
https://github.com/craigerl/aprsd.git
synced 2024-11-18 06:11:49 -05:00
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:
parent
6b083d4c4d
commit
d63c6854af
@ -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) {
|
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) {
|
if (ack_id) {
|
||||||
alt = " alt"
|
alt = " alt"
|
||||||
} else {
|
} else {
|
||||||
@ -400,7 +400,7 @@ function create_message_html(date, time, from, to, message, ack_id, msg, acked=f
|
|||||||
|
|
||||||
function flash_message(msg) {
|
function flash_message(msg) {
|
||||||
// Callback function to bring a hidden box back
|
// Callback function to bring a hidden box back
|
||||||
id = msg.from + "_" + msg.id;
|
id = msg.from + "_" + msg.msgNo;
|
||||||
var msgid = $('#'+id);
|
var msgid = $('#'+id);
|
||||||
msgid.effect("pulsate", { times:3 }, 2000);
|
msgid.effect("pulsate", { times:3 }, 2000);
|
||||||
}
|
}
|
||||||
@ -423,7 +423,7 @@ function from_msg(msg) {
|
|||||||
from_msg_list[msg.from_call] = new Array();
|
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
|
// We already have this message
|
||||||
console.log("We already have this message " + msg);
|
console.log("We already have this message " + msg);
|
||||||
// Do some flashy thing?
|
// Do some flashy thing?
|
||||||
|
Loading…
Reference in New Issue
Block a user