mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-06-22 11:05:11 +02:00
Add some additional debug for message scope
This commit is contained in:
@@ -307,9 +307,16 @@ async def process_raw_packet(
|
||||
|
||||
# Log packet arrival at debug level
|
||||
path_hex = packet_info.path.hex() if packet_info and packet_info.path else ""
|
||||
route_type_name = (
|
||||
getattr(packet_info.route_type, "name", packet_info.route_type)
|
||||
if packet_info
|
||||
else "Unknown"
|
||||
)
|
||||
logger.debug(
|
||||
"Packet received: type=%s, is_new=%s, packet_id=%d, path='%s'",
|
||||
"Packet received: type=%s, route=%s, hops=%s, is_new=%s, packet_id=%d, path='%s'",
|
||||
payload_type_name,
|
||||
route_type_name,
|
||||
packet_info.path_length if packet_info else "?",
|
||||
is_new_packet,
|
||||
packet_id,
|
||||
path_hex[:8] if path_hex else "(direct)",
|
||||
|
||||
@@ -266,6 +266,12 @@ async def send_channel_message_with_effective_scope(
|
||||
)
|
||||
radio_manager.invalidate_cached_channel_slot(channel_key)
|
||||
else:
|
||||
logger.debug(
|
||||
"Radio send result for %s (%s): %r",
|
||||
channel.name,
|
||||
action_label,
|
||||
send_result.payload,
|
||||
)
|
||||
radio_manager.note_channel_slot_used(channel_key)
|
||||
return send_result
|
||||
finally:
|
||||
@@ -603,6 +609,12 @@ async def send_direct_message_to_contact(
|
||||
if result.type == EventType.ERROR:
|
||||
raise HTTPException(status_code=422, detail=f"Failed to send message: {result.payload}")
|
||||
|
||||
logger.debug(
|
||||
"Radio send result for direct message to %s: %r",
|
||||
contact.public_key[:12],
|
||||
result.payload,
|
||||
)
|
||||
|
||||
message = await create_outgoing_direct_message(
|
||||
conversation_key=contact.public_key.lower(),
|
||||
text=text,
|
||||
|
||||
Reference in New Issue
Block a user