Skip to content
Snippets Groups Projects
Commit 8578bd78 authored by Larbi Gharib's avatar Larbi Gharib Committed by Adrien Béraud
Browse files

Search endpoint profiles

Change-Id: Id569c9213be79c1864d458e491b68a3e9ad94eef
parent 4200de27
No related branches found
No related tags found
No related merge requests found
......@@ -508,12 +508,13 @@ ServerAccountManager::searchUser(const std::string& query, SearchCallback cb)
auto& this_ = *static_cast<ServerAccountManager*>(&accountManager);
if (response.status_code >= 200 && response.status_code < 300) {
try {
Json::Value::ArrayIndex rcount = json.size();
const auto& profiles = json["profiles"];
Json::Value::ArrayIndex rcount = profiles.size();
std::vector<std::map<std::string, std::string>> results;
results.reserve(rcount);
JAMI_WARN("[Search] Got server response: %s", response.body.c_str());
for (Json::Value::ArrayIndex i = 0; i < rcount; i++) {
const auto& ruser = json[i];
const auto& ruser = profiles[i];
std::map<std::string, std::string> user;
for (const auto& member : ruser.getMemberNames()) {
const auto& rmember = ruser[member];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment