Don't treat matched-prefix DMs as an ack (as it is an echo-ack for channel messages, not DMs)

This commit is contained in:
Jack Kingsman
2026-03-13 22:17:27 -07:00
parent 5512f9e677
commit 04b324b711
3 changed files with 20 additions and 6 deletions
+1 -1
View File
@@ -115,7 +115,7 @@ app/
### Echo/repeat dedup
- Message uniqueness: `(type, conversation_key, text, sender_timestamp)`.
- Duplicate insert is treated as an echo/repeat: the new path (if any) is appended, and the ACK count is incremented **only for outgoing messages**. Incoming repeats add path data but do not change the ACK count.
- Duplicate insert is treated as an echo/repeat: the new path (if any) is appended, and the ACK count is incremented only for outgoing channel messages. Incoming repeats and direct-message duplicates may still add path data, but DM delivery state advances only from real ACK events.
### Raw packet dedup policy
+1 -1
View File
@@ -166,7 +166,7 @@ async def handle_duplicate_message(
else:
paths = existing_msg.paths or []
if existing_msg.outgoing:
if existing_msg.outgoing and existing_msg.type == "CHAN":
ack_count = await MessageRepository.increment_ack_count(existing_msg.id)
else:
ack_count = existing_msg.acked