summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_messages.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-05 19:32:47 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-05 19:32:47 +0000
commit3ffa79499e8b9c270fa33c1f1b90ef9b09fe43be (patch)
tree7e44a4b7c319bf4dfc98a4f332a09a78333a765d /protocols/SkypeWeb/src/skype_messages.cpp
parenta5b3b10b0fb74f875aabda2db2e21311c02bdfee (diff)
SkypeWeb: History sync reworked.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12618 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index ae43e0a500..6debc0257e 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -178,10 +178,10 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
if (root == NULL)
return;
- JSONNODE *conversations = json_as_array(json_get(root, "conversations"));
+ JSONNODE *conversations = json_as_array(json_get(root, "messages"));
for (size_t i = 0; i < json_size(conversations); i++)
{
- JSONNODE *message = json_get(json_at(conversations, i), "lastMessage");
+ JSONNODE *message = json_at(conversations, i);
ptrA clientMsgId(mir_t2a(ptrT(json_as_string(json_get(message, "clientmessageid")))));
ptrA skypeEditedId(mir_t2a(ptrT(json_as_string(json_get(message, "skypeeditedid")))));
@@ -210,4 +210,10 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
AddMessageToDb(hContact, timestamp, flags, clientMsgId, content, emoteOffset);
}
}
+}
+
+INT_PTR CSkypeProto::GetContactHistory(WPARAM hContact, LPARAM lParam)
+{
+ PushRequest(new GetHistoryRequest(ptrA(getStringA("registrationToken")), ptrA(db_get_sa(hContact, m_szModuleName, "Skypename")), ptrA(getStringA("Server"))), &CSkypeProto::OnGetServerHistory);
+ return 0;
} \ No newline at end of file