diff --git a/gui/preload-chat.js b/gui/preload-chat.js index e021463e..cc6d0653 100644 --- a/gui/preload-chat.js +++ b/gui/preload-chat.js @@ -272,6 +272,13 @@ window.addEventListener("DOMContentLoaded", () => { }); }); + document.getElementById("requestUserInfo").addEventListener("click", () => { + ipcRenderer.send("run-tnc-command", { + command: "requestUserInfo", + dxcallsign: selected_callsign, + }); + }); + document.getElementById("ping").addEventListener("click", () => { ipcRenderer.send("run-tnc-command", { command: "ping", diff --git a/gui/preload-main.js b/gui/preload-main.js index 8ee24cf7..1a80bc40 100644 --- a/gui/preload-main.js +++ b/gui/preload-main.js @@ -2576,6 +2576,11 @@ ipcRenderer.on("run-tnc-command", (event, arg) => { if (arg.command == "mode") { sock.set_mode(arg.mode); } + + if (arg.command == "requestUserInfo") { + sock.sendRequestInfo(arg.dxcallsign); + } + }); // IPC ACTION FOR AUTO UPDATER diff --git a/gui/sock.js b/gui/sock.js index 48beff65..4566268a 100644 --- a/gui/sock.js +++ b/gui/sock.js @@ -686,9 +686,9 @@ function sendRequest(dxcallsign, mode, frames, data, command) { } //Send station info request -exports.sendRequestInfo = function (dxcallsign, mode, frames) { +exports.sendRequestInfo = function (dxcallsign) { //Command 0 = user/station information - sendRequest(dxcallsign, mode, frames, "0", "req"); + sendRequest(dxcallsign, 255, 1, "0", "req"); }; //STOP TRANSMISSION diff --git a/gui/src/chat-module.html b/gui/src/chat-module.html index c5e9eef4..a051c0f2 100644 --- a/gui/src/chat-module.html +++ b/gui/src/chat-module.html @@ -529,6 +529,7 @@ type="button" class="btn btn-warning w-75" aria-label="Request" + id="requestUserInfo" > Request user data