From 5ef59d356307741e692dc25bb95549ae72f47be4 Mon Sep 17 00:00:00 2001 From: Mashintime Date: Wed, 8 Feb 2023 17:24:30 -0500 Subject: [PATCH] Fix for UUID tweak --- gui/preload-chat.js | 6 ++++++ gui/sock.js | 9 +-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gui/preload-chat.js b/gui/preload-chat.js index de9f517d..7a969a99 100644 --- a/gui/preload-chat.js +++ b/gui/preload-chat.js @@ -331,6 +331,12 @@ db.post({ document.getElementById('selectFilesButton').innerHTML = ``; var uuid = uuidv4(); + let uuidlast = uuid.lastIndexOf('-'); + uuidlast +=1; + if (uuidlast > 0) + { + uuid = uuid.substring(uuidlast); + } console.log(data_with_attachment) let Data = { command: "send_message", diff --git a/gui/sock.js b/gui/sock.js index cb6370f6..a23dd99f 100644 --- a/gui/sock.js +++ b/gui/sock.js @@ -543,14 +543,7 @@ exports.sendMessage = function(dxcallsign, mode, frames, data, checksum, uuid, c //socketLog.info(data) //shorten uuid - let uuidlast = uuid.lastIndexOf('-'); - uuidlast +=1; - if (uuidlast > 0) - { - uuid = uuid.substr(uuidlast); - //console.log("UUID shortened to: ",uuid); - } - + var datatype = "m" data = datatype + split_char + command + split_char + checksum + split_char + uuid + split_char + data //socketLog.info(data)