When the companion's offline queue is full (OFFLINE_QUEUE_SIZE, default 16) and holds no channel messages, addToOfflineQueue() drops the incoming direct message (examples/companion_radio/MyMesh.cpp, dev, lines 224-246). BaseChatMesh::onPeerDataRecv() still sends the ACK afterwards (src/helpers/BaseChatMesh.cpp, around lines 239-254), because onMessageRecv() returns void.
Result: the sender sees the message as delivered, but it never reaches the app. This happens when the phone is disconnected for a while and more than 16 DMs arrive.
Suggested fix, in increasing scope:
- Let
onMessageRecv() return whether the message was stored, and only ACK when it was. The sender then retries later, as it would for an unreachable node.
- When the queue is full of DMs, evict other non-DM frames first, and only refuse (no ACK) as a last resort.
- Optionally, keep the offline queue in flash so a reboot or empty battery does not lose ACKed messages.
Related: #1834 (failed delivery shown but message received) is the inverse case; this one reports success while the message is lost.
When the companion's offline queue is full (
OFFLINE_QUEUE_SIZE, default 16) and holds no channel messages,addToOfflineQueue()drops the incoming direct message (examples/companion_radio/MyMesh.cpp,dev, lines 224-246).BaseChatMesh::onPeerDataRecv()still sends the ACK afterwards (src/helpers/BaseChatMesh.cpp, around lines 239-254), becauseonMessageRecv()returns void.Result: the sender sees the message as delivered, but it never reaches the app. This happens when the phone is disconnected for a while and more than 16 DMs arrive.
Suggested fix, in increasing scope:
onMessageRecv()return whether the message was stored, and only ACK when it was. The sender then retries later, as it would for an unreachable node.Related: #1834 (failed delivery shown but message received) is the inverse case; this one reports success while the message is lost.