sync with vanilla dev

This commit is contained in:
liquidraver
2026-06-15 15:25:04 +02:00
parent b97d079e56
commit dc7a2827a3
2 changed files with 19 additions and 3 deletions
+10 -1
View File
@@ -107,7 +107,11 @@ ContactInfo *BaseChatMesh::allocateContactSlot(bool transient_only)
}
}
if (oldest_idx >= 0) {
onContactOverwrite(contacts[oldest_idx].id.pub_key);
if (!transient_only) {
// recycling an anon slot isn't a "contact deleted" event -- the
// app was never told this transient pubkey existed
onContactOverwrite(contacts[oldest_idx].id.pub_key);
}
return &contacts[oldest_idx];
}
}
@@ -165,6 +169,11 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet *packet, const mesh::Identity &id,
packet->header = save;
}
if (from && from->type == ADV_TYPE_NONE) { // matched a transient anon/ANON_REQ slot -- promote to a real contact
*from = ContactInfo{};
from = nullptr;
}
bool is_new = false;
if (from == nullptr) {
LOG_DBG("onAdvertRecv: new contact, checking auto-add for type %d", parser.getType());