diff --git a/globals.py b/globals.py index 43043a1..7f941d2 100644 --- a/globals.py +++ b/globals.py @@ -10,4 +10,5 @@ interface = None display_log = False db_file_path = "client.db" message_prefix = ">>" +sent_message_prefix =">> Sent:" notification_symbol = "*" \ No newline at end of file diff --git a/message_handlers/rx_handler.py b/message_handlers/rx_handler.py index 4e52954..c3e8287 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"]["longName"] # Get the long name using the node ID + message_from_string = node["user"]["shortName"] # Get the long 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/ui/curses_ui.py b/ui/curses_ui.py index b8e3c07..b482090 100644 --- a/ui/curses_ui.py +++ b/ui/curses_ui.py @@ -42,7 +42,7 @@ def update_messages_window(): wrapped_messages = textwrap.wrap(full_message, messages_win.getmaxyx()[1] - 2) for wrapped_message in wrapped_messages: - messages_win.addstr(row, 1, wrapped_message, curses.color_pair(1) if prefix.startswith(">> Sent:") else curses.color_pair(2)) + messages_win.addstr(row, 1, wrapped_message, curses.color_pair(1) if prefix.startswith(globals.sent_message_prefix) else curses.color_pair(2)) row += 1 messages_win.box()