Fix dupe packet test

This commit is contained in:
Jack Kingsman
2026-01-10 11:50:13 -08:00
parent 1e680a0c09
commit 150d1fb9b4
3 changed files with 155 additions and 6 deletions
+19 -2
View File
@@ -92,7 +92,7 @@ async def create_message_from_decrypted(
"txt_type": 0,
"signature": None,
"outgoing": False,
"acked": False,
"acked": 0,
})
return msg_id
@@ -131,6 +131,23 @@ async def process_raw_packet(
packet_id = await RawPacketRepository.create(raw_bytes, ts)
# If packet_id is None, this is a duplicate packet (same data already exists)
# Skip processing since we've already handled this exact packet
if packet_id is None:
logger.debug("Duplicate raw packet detected, skipping")
return {
"packet_id": None,
"timestamp": ts,
"raw_hex": raw_bytes.hex(),
"payload_type": "Duplicate",
"snr": snr,
"rssi": rssi,
"decrypted": False,
"message_id": None,
"channel_name": None,
"sender": None,
}
raw_hex = raw_bytes.hex()
# Parse packet to get type
@@ -295,7 +312,7 @@ async def _process_group_text(
"txt_type": 0,
"signature": None,
"outgoing": False,
"acked": False,
"acked": 0,
})
# Mark the raw packet as decrypted