Skip to content

Commit

Permalink
WebChat: cleanup some console.logs
Browse files Browse the repository at this point in the history
  • Loading branch information
hemna committed Sep 26, 2023
1 parent 12dfdef commit 82d2591
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions aprsd/web/chat/static/js/send-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ function init_chat() {

socket.on("ack", function(msg) {
msg["type"] = MSG_TYPE_ACK;
console.log("ACK MESSAGE")
console.log(msg)
ack_msg(msg);
});

Expand All @@ -56,8 +54,6 @@ function init_chat() {
msgsdiv.html('')
cleared = true;
}
console.log("NEW MESSAGE")
console.log(msg)
msg["type"] = MSG_TYPE_RX;
from_msg(msg);
});
Expand Down Expand Up @@ -430,10 +426,6 @@ function from_msg(msg) {
from_msg_list[msg["from_call"]] = new Array();
}

console.log(from_msg_list);
console.log("Does " + msg["msgNo"] + " exist in " + msg["from_call"] + "?")
console.log(msg["msgNo"] in from_msg_list[msg["from_call"]]);
console.log(from_msg_list[msg["from_call"]].includes(msg["msgNo"]));
if (msg["msgNo"] in from_msg_list[msg["from_call"]]) {
// We already have this message
console.log("We already have this message msgNo=" + msg["msgNo"]);
Expand Down Expand Up @@ -465,17 +457,13 @@ function ack_msg(msg) {
callsign = msg['to_call'];
// Ensure the message_list has this callsign
if (!message_list.hasOwnProperty(callsign)) {
console.log("No message_list for " + callsign);
return false
}
// Ensure the message_list has this id
if (!message_list[callsign].hasOwnProperty(id)) {
console.log("No message_list for " + callsign + " " + id);
return false
}
console.log("Marking message as acked " + callsign + " " + id)
if (message_list[callsign][id]['ack'] == true) {
console.log("Message already acked");
return false;
}
message_list[callsign][id]['ack'] = true;
Expand Down

0 comments on commit 82d2591

Please sign in to comment.