diff --git a/gui/preload-chat.js b/gui/preload-chat.js index aace6634..93ed5e08 100644 --- a/gui/preload-chat.js +++ b/gui/preload-chat.js @@ -634,6 +634,25 @@ ipcRenderer.on("action-new-msg-received", (event, arg) => { add_obj_to_database(obj); update_chat_obj_by_uuid(obj.uuid); + // handle beacon + } else if (item.ping == "acknowledge") { + obj.timestamp = parseInt(item.timestamp); + obj.dxcallsign = item.dxcallsign; + obj.dxgrid = item.dxgrid; + obj.uuid = item.uuid; + obj.command = "ping-ack"; + obj.checksum = "null"; + obj.msg = "null"; + obj.status = item.status; + obj.snr = item.dxsnr + "/" + item.snr; + obj.type = "ping-ack"; + obj.filename = "null"; + obj.filetype = "null"; + obj.file = "null"; + + add_obj_to_database(obj); + update_chat_obj_by_uuid(obj.uuid); + // handle beacon } else if (item.beacon == "received") { obj.timestamp = parseInt(item.timestamp); @@ -856,7 +875,13 @@ update_chat = function (obj) { var new_message = `

snr: ${obj.snr} - ${timestamp}

- +
+ `; + } + if (obj.type == "ping-ack") { + var new_message = ` +
+

Ping ack dx/mine snr: ${obj.snr} - ${timestamp}

`; }