diff --git a/command_handlers.py b/command_handlers.py index 798c110..3ecc5b3 100644 --- a/command_handlers.py +++ b/command_handlers.py @@ -61,10 +61,10 @@ def handle_help_command(sender_id, interface, menu_name=None): response = build_menu(utilities_menu_items, "🛠️Utilities Menu🛠️") else: update_user_state(sender_id, {'command': 'MAIN_MENU', 'step': 1}) # Reset to main menu state - response = build_menu(main_menu_items, "💾TC² BBS💾") + mail = get_mail(get_node_id_from_num(sender_id, interface)) + response = build_menu(main_menu_items, f"💾TC² BBS💾 (✉️:{len(mail)})") send_message(response, sender_id, interface) - def get_node_name(node_id, interface): node_info = interface.nodes.get(node_id) if node_info: diff --git a/message_processing.py b/message_processing.py index 0d504ca..caea313 100644 --- a/message_processing.py +++ b/message_processing.py @@ -186,7 +186,7 @@ def on_receive(packet, interface): sender_short_name = get_node_short_name(sender_node_id, interface) receiver_short_name = get_node_short_name(get_node_id_from_num(to_id, interface), interface) if to_id else "Group Chat" - logging.info(f"Received message from user '{sender_short_name}' to {receiver_short_name}: {message_string}") + logging.info(f"Received message from user '{sender_short_name}' ({sender_node_id}) to {receiver_short_name}: {message_string}") bbs_nodes = interface.bbs_nodes is_sync_message = any(message_string.startswith(prefix) for prefix in diff --git a/utils.py b/utils.py index a6f9bc4..23ec97a 100644 --- a/utils.py +++ b/utils.py @@ -20,10 +20,11 @@ def send_message(message, destination, interface): d = interface.sendText( text=chunk, destinationId=destination, - wantAck=False, + wantAck=True, wantResponse=False ) - logging.info(f"REPLY SEND ID={d.id}") + destid = get_node_id_from_num(destination, interface) + logging.info(f"Sending message to user '{get_node_short_name(destid, interface)}' ({destid}) with sendID {d.id}: \'{chunk.replace("\n", "\\n")}\'") except Exception as e: logging.info(f"REPLY SEND ERROR {e.message}")