summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_poll_processing.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-05-10 09:28:16 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-05-10 09:28:16 +0000
commit3506c2bc0bb148120db8e8c7c6a07cf3e683cc50 (patch)
tree741896b256a21118d3d6a8f97b84f49d2e70ab8b /protocols/SkypeWeb/src/skype_poll_processing.cpp
parentc13847cba6ade5d5de16c223dfbbf92561dceb85 (diff)
SkypeWeb: Mark messsges as read rework.
git-svn-id: http://svn.miranda-ng.org/main/trunk@13504 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_poll_processing.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_poll_processing.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_poll_processing.cpp b/protocols/SkypeWeb/src/skype_poll_processing.cpp
index 327bbaae3d..7682006a48 100644
--- a/protocols/SkypeWeb/src/skype_poll_processing.cpp
+++ b/protocols/SkypeWeb/src/skype_poll_processing.cpp
@@ -141,17 +141,29 @@ void CSkypeProto::ProcessConversationUpdateRes(JSONNODE *node)
JSONNODE *properties = json_get(node, "properties" );
ptrA convLink(mir_t2a(json_as_string(json_get(lastMessage, "conversationLink"))));
+ ptrA fromLink(mir_t2a(json_as_string(json_get(lastMessage, "from"))));
- if (strstr(convLink, "/8:"))
+ if (strstr(convLink, "/8:") && IsMe(ContactUrlToName(fromLink)))
{
ptrA skypename(ContactUrlToName(convLink));
MCONTACT hContact = FindContact(skypename);
if (hContact != NULL)
{
- ptrA consumptionhorizon(mir_t2a(json_as_string(json_get(properties, "consumptionhorizon"))));
+ CMStringA consumptionhorizon(mir_t2a(json_as_string(json_get(properties, "consumptionhorizon"))));
- //server return bad data
+ int iStart = 0;
+ CMStringA szToken1 = consumptionhorizon.Tokenize(";", iStart).Trim();
+
+ if (iStart != -1)
+ {
+ CMStringA szToken2 = consumptionhorizon.Tokenize(";", iStart).Trim();
+
+ time_t evttime = atoi(szToken2.GetBuffer());
+ db_set_dw(hContact, m_szModuleName, "LastMsgReadTime", evttime);
+
+ SetSrmmReadStatus(hContact);
+ }
}
}
}