fix(auto): don't re-post conversation notif on outgoing messages

rememberDataPacket() was invoking handlePacketNotification() for
outgoing packets too, which made our own reply race with the
cancel issued by ReplyReceiver and repost the conversation with
ourselves as the visible sender (lastMessage.node == ourNode).

Also harden ensureShortcutForNotification for DMs: the remote
contact is deterministic from contactKey (channel + nodeId), so
derive the shortcut Person from the resolved contact node rather
than whatever message happens to be newest in history. This keeps
the Android Auto HUN labelled correctly even if the message list
ends with an outgoing packet.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
James Rich 2026-04-17 09:12:48 -05:00
parent 72e27e32cc
commit c1073f3e12
3 changed files with 18 additions and 14 deletions

View file

@ -357,7 +357,7 @@ class MeshDataHandlerImpl(
read = fromLocal || isFiltered,
filtered = isFiltered,
)
if (!isFiltered) {
if (!isFiltered && !fromLocal) {
handlePacketNotification(dataPacket, contactKey, updateNotification)
}
}