~aleteoryx/muditaos

20edafc8768b5865ba0581b1bcafb10d985b6b31 — Lukasz Mastalerz 2 years ago cfa409e
[CP-2020] Imported contact does not appear in Center

Stopped sending notification when contact add failed
1 files changed, 3 insertions(+), 4 deletions(-)

M module-db/Interface/ContactRecord.cpp
M module-db/Interface/ContactRecord.cpp => module-db/Interface/ContactRecord.cpp +3 -4
@@ 626,13 626,12 @@ auto ContactRecordInterface::addQuery(const std::shared_ptr<db::Query> &query) -
    if (duplicates.empty()) {
        result = ContactRecordInterface::Add(addQuery->rec);
    }
    else {
        addQuery->rec.ID = DB_ID_NONE;
    }

    auto response = std::make_unique<db::query::ContactAddResult>(result, addQuery->rec.ID, duplicates);
    response->setRequestQuery(query);
    response->setRecordID(addQuery->rec.ID);
    if (addQuery->rec.ID != DB_ID_NONE) {
        response->setRecordID(addQuery->rec.ID);
    }
    return response;
}