summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_contacts.cpp
diff options
context:
space:
mode:
authorMikalaiR <mikalair@outlook.com>2017-08-09 17:03:02 +0300
committerMikalaiR <mikalair@outlook.com>2017-08-09 17:03:02 +0300
commitd85622486a4e86cbce090c23998ac5c36b231b24 (patch)
tree35e3213a7447ac6681ca9849642181f3219d61b4 /protocols/SkypeWeb/src/skype_contacts.cpp
parent2610d3eb5477a689146b8bbf9fb8aea27ef89719 (diff)
SkypeWeb: switched to new contacts api (fixes #732)
Diffstat (limited to 'protocols/SkypeWeb/src/skype_contacts.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_contacts.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp
index 9898accb41..a7e24d8f28 100644
--- a/protocols/SkypeWeb/src/skype_contacts.cpp
+++ b/protocols/SkypeWeb/src/skype_contacts.cpp
@@ -111,15 +111,16 @@ void CSkypeProto::LoadContactsAuth(const NETLIBHTTPREQUEST *response)
if (!root)
return;
- const JSONNode &items = root.as_array();
+ const JSONNode &items = root["invite_list"].as_array();
for (size_t i = 0; i < items.size(); i++) {
const JSONNode &item = items.at(i);
if (!item)
break;
- std::string skypename = item["sender"].as_string();
+ std::string skypename = item["mri"].as_string().erase(0, 2);
std::string reason = item["greeting"].as_string();
- time_t eventTime = IsoToUnixTime(item["event_time_iso"].as_string().c_str());
+
+ time_t eventTime = IsoToUnixTime(item["invites"][json_index_t(0)].as_string().c_str());
MCONTACT hContact = AddContact(skypename.c_str());
if (hContact) {