Settings - Sound: Add Advert scope

This commit is contained in:
vanous
2026-06-07 10:53:17 +02:00
parent 7703b3ae36
commit 8e1352b24a
12 changed files with 56 additions and 21 deletions

View File

@@ -144,7 +144,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
if (!shouldAutoAddContactType(parser.getType())) {
ContactInfo ci;
populateContactFromAdvert(ci, id, parser, timestamp);
onDiscoveredContact(ci, true, packet->path_len, packet->path); // let UI know
onDiscoveredContact(ci, true, packet->path_len, packet->path, packet->isRouteFlood()); // let UI know
return;
}
@@ -153,7 +153,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
if (max_hops > 0 && packet->getPathHashCount() >= max_hops) {
ContactInfo ci;
populateContactFromAdvert(ci, id, parser, timestamp);
onDiscoveredContact(ci, true, packet->path_len, packet->path); // let UI know
onDiscoveredContact(ci, true, packet->path_len, packet->path, packet->isRouteFlood()); // let UI know
return;
}
@@ -161,7 +161,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
if (from == NULL) {
ContactInfo ci;
populateContactFromAdvert(ci, id, parser, timestamp);
onDiscoveredContact(ci, true, packet->path_len, packet->path);
onDiscoveredContact(ci, true, packet->path_len, packet->path, packet->isRouteFlood());
onContactsFull();
MESH_DEBUG_PRINTLN("onAdvertRecv: unable to allocate contact slot for new contact");
return;
@@ -183,7 +183,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
from->last_advert_timestamp = timestamp;
from->lastmod = getRTCClock()->getCurrentTime();
onDiscoveredContact(*from, is_new, packet->path_len, packet->path); // let UI know
onDiscoveredContact(*from, is_new, packet->path_len, packet->path, packet->isRouteFlood()); // let UI know
}
int BaseChatMesh::searchPeersByHash(const uint8_t* hash) {