From c5dc867633d2e907ee2049537947c2262be430a1 Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Sun, 12 Jan 2025 18:41:42 -0800 Subject: [PATCH] preFIXes --- message_handlers/rx_handler.py | 2 +- message_handlers/tx_handler.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/message_handlers/rx_handler.py b/message_handlers/rx_handler.py index c3e8287..00df0d5 100644 --- a/message_handlers/rx_handler.py +++ b/message_handlers/rx_handler.py @@ -49,7 +49,7 @@ def on_receive(packet): message_from_string = "" for node in globals.interface.nodes.values(): if message_from_id == node['num']: - message_from_string = node["user"]["shortName"] # Get the long name using the node ID + message_from_string = node["user"]["shortName"] + ":" # Get the name using the node ID break else: message_from_string = str(decimal_to_hex(message_from_id)) # If long name not found, use the ID as string diff --git a/message_handlers/tx_handler.py b/message_handlers/tx_handler.py index e94bc31..37fe15a 100644 --- a/message_handlers/tx_handler.py +++ b/message_handlers/tx_handler.py @@ -25,8 +25,8 @@ def send_message(message, destination=BROADCAST_NUM, channel=0): # Add sent message to the messages dictionary if globals.channel_list[channel] in globals.all_messages: - globals.all_messages[globals.channel_list[channel]].append((">> Sent: ", message)) + globals.all_messages[globals.channel_list[channel]].append((globals.sent_message_prefix + " ", message)) else: - globals.all_messages[globals.channel_list[channel]] = [(">> Sent: ", message)] + globals.all_messages[globals.channel_list[channel]] = [(globals.sent_message_prefix + " ", message)] save_message_to_db(globals.channel_list[channel], myid, message) \ No newline at end of file