From 33e2d63de1726ad07ab21384fcc42738b4741527 Mon Sep 17 00:00:00 2001 From: Mashintime Date: Sun, 14 Jan 2024 11:47:43 -0500 Subject: [PATCH] Allow sending blank message if an attachment is present --- gui/src/components/chat_new_message.vue | 2 +- gui/src/store/chatStore.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gui/src/components/chat_new_message.vue b/gui/src/components/chat_new_message.vue index e56190c9..4350d6d7 100644 --- a/gui/src/components/chat_new_message.vue +++ b/gui/src/components/chat_new_message.vue @@ -50,7 +50,7 @@ const chatModuleMessage=ref(null); function transmitNewMessage(){ chat.inputText = chat.inputText.trim(); - if (chat.inputText.length==0) + if (chat.inputText.length==0 && chat.inputFileName == "-") return; if (chat.selectedCallsign.startsWith("BC-")) { diff --git a/gui/src/store/chatStore.js b/gui/src/store/chatStore.js index 327f0685..1041f429 100644 --- a/gui/src/store/chatStore.js +++ b/gui/src/store/chatStore.js @@ -42,9 +42,9 @@ export const useChatStore = defineStore("chatStore", () => { }); var inputText = ref(""); var inputFile = ref(); - var inputFileName = ref(); - var inputFileType = ref(); - var inputFileSize = ref(); + var inputFileName = ref("-"); + var inputFileType = ref("-"); + var inputFileSize = ref("-"); var callsign_list = ref(); var sorted_chat_list = ref();