diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-30 22:33:11 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-30 22:33:11 +0300 |
commit | 59f36ebf68039d1ad649772dbb8d99217fbd079f (patch) | |
tree | 510fe8371dcbd784f0ee2c75964d3b365c2cd8d1 /protocols | |
parent | e15387a6bed3f51808ebae53220070aa4f1da86a (diff) |
ICQ: fix for retrieving location data
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/Icq10/src/server.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/protocols/Icq10/src/server.cpp b/protocols/Icq10/src/server.cpp index e1cf50809f..006b2d6959 100644 --- a/protocols/Icq10/src/server.cpp +++ b/protocols/Icq10/src/server.cpp @@ -135,13 +135,16 @@ MCONTACT CIcqProto::ParseBuddyInfo(const JSONNode &buddy) setByte(hContact, "Gender", 'F'); } - const JSONNode &homeAddress = profile["homeAddress"]; - if (homeAddress) { - str = homeAddress["city"].as_mstring(); + for (auto &it : profile["homeAddress"]) { + str = it["city"].as_mstring(); if (!str.IsEmpty()) setWString(hContact, "City", str); - str = homeAddress["country"].as_mstring(); + str = it["state"].as_mstring(); + if (!str.IsEmpty()) + setWString(hContact, "State", str); + + str = it["country"].as_mstring(); if (!str.IsEmpty()) setWString(hContact, "Country", str); } |