always send PUSH_CODE_NEW_ADVERT when advert was not added to contacts[]

Этот коммит содержится в:
taco
2026-01-16 13:15:35 +11:00
родитель 7d1f52252b
Коммит c61fde9328
2 изменённых файлов: 2 добавлений и 3 удалений
+1 -2
Просмотреть файл
@@ -133,7 +133,7 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
}
putBlobByKey(id.pub_key, PUB_KEY_SIZE, temp_buf, plen);
bool is_new = false;
bool is_new = false; // true = not in contacts[], false = exists in contacts[]
if (from == NULL) {
if (!shouldAutoAddContactType(parser.getType())) {
ContactInfo ci;
@@ -142,7 +142,6 @@ void BaseChatMesh::onAdvertRecv(mesh::Packet* packet, const mesh::Identity& id,
return;
}
is_new = true;
from = allocateContactSlot();
if (from == NULL) {
ContactInfo ci;