mirror of
				https://github.com/craigerl/aprsd.git
				synced 2025-11-04 05:30:27 -05:00 
			
		
		
		
	WebChat: cleanup some console.logs
This commit is contained in:
		
							parent
							
								
									12dfdefb62
								
							
						
					
					
						commit
						82d25915fc
					
				@ -45,8 +45,6 @@ function init_chat() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
   socket.on("ack", function(msg) {
 | 
					   socket.on("ack", function(msg) {
 | 
				
			||||||
       msg["type"] = MSG_TYPE_ACK;
 | 
					       msg["type"] = MSG_TYPE_ACK;
 | 
				
			||||||
       console.log("ACK MESSAGE")
 | 
					 | 
				
			||||||
       console.log(msg)
 | 
					 | 
				
			||||||
       ack_msg(msg);
 | 
					       ack_msg(msg);
 | 
				
			||||||
   });
 | 
					   });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -56,8 +54,6 @@ function init_chat() {
 | 
				
			|||||||
           msgsdiv.html('')
 | 
					           msgsdiv.html('')
 | 
				
			||||||
           cleared = true;
 | 
					           cleared = true;
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
       console.log("NEW MESSAGE")
 | 
					 | 
				
			||||||
       console.log(msg)
 | 
					 | 
				
			||||||
       msg["type"] = MSG_TYPE_RX;
 | 
					       msg["type"] = MSG_TYPE_RX;
 | 
				
			||||||
       from_msg(msg);
 | 
					       from_msg(msg);
 | 
				
			||||||
   });
 | 
					   });
 | 
				
			||||||
@ -430,10 +426,6 @@ function from_msg(msg) {
 | 
				
			|||||||
        from_msg_list[msg["from_call"]] = new Array();
 | 
					        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"]]) {
 | 
					   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 msgNo=" + msg["msgNo"]);
 | 
					       console.log("We already have this message msgNo=" + msg["msgNo"]);
 | 
				
			||||||
@ -465,17 +457,13 @@ function ack_msg(msg) {
 | 
				
			|||||||
   callsign = msg['to_call'];
 | 
					   callsign = msg['to_call'];
 | 
				
			||||||
   // Ensure the message_list has this callsign
 | 
					   // Ensure the message_list has this callsign
 | 
				
			||||||
   if (!message_list.hasOwnProperty(callsign)) {
 | 
					   if (!message_list.hasOwnProperty(callsign)) {
 | 
				
			||||||
       console.log("No message_list for " + callsign);
 | 
					 | 
				
			||||||
       return false
 | 
					       return false
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
   // Ensure the message_list has this id
 | 
					   // Ensure the message_list has this id
 | 
				
			||||||
   if (!message_list[callsign].hasOwnProperty(id)) {
 | 
					   if (!message_list[callsign].hasOwnProperty(id)) {
 | 
				
			||||||
       console.log("No message_list for " + callsign + " " + id);
 | 
					 | 
				
			||||||
       return false
 | 
					       return false
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
   console.log("Marking message as acked " + callsign + " " + id)
 | 
					 | 
				
			||||||
   if (message_list[callsign][id]['ack'] == true) {
 | 
					   if (message_list[callsign][id]['ack'] == true) {
 | 
				
			||||||
       console.log("Message already acked");
 | 
					 | 
				
			||||||
       return false;
 | 
					       return false;
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
   message_list[callsign][id]['ack'] = true;
 | 
					   message_list[callsign][id]['ack'] = true;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user