summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_history_sync.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-05-06 12:46:27 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-05-06 12:46:27 +0000
commitd44364a07a1213424fe0a6b14d948b43768137df (patch)
tree63926ec6d66d1dbcdd2c227756869ef1afc542e2 /protocols/SkypeWeb/src/skype_history_sync.cpp
parentae000b6fc033ac281a4ae61440188b2f4d096036 (diff)
SkypeWeb: Setting for mark all messages as unread. Other fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@13459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_history_sync.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_history_sync.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/protocols/SkypeWeb/src/skype_history_sync.cpp b/protocols/SkypeWeb/src/skype_history_sync.cpp
index 80155e1c88..98afb8bb90 100644
--- a/protocols/SkypeWeb/src/skype_history_sync.cpp
+++ b/protocols/SkypeWeb/src/skype_history_sync.cpp
@@ -34,10 +34,16 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
int totalCount = json_as_int(json_get(metadata, "totalCount"));
ptrA syncState(mir_t2a(ptrT(json_as_string(json_get(metadata, "syncState")))));
+ bool markAllAsUnread = getByte("MarkMesUnread",0);
if (totalCount >= 99 || json_size(conversations) >= 99)
PushRequest(new GetHistoryOnUrlRequest(syncState, RegToken), &CSkypeProto::OnGetServerHistory);
+ int flags = DBEF_UTF;
+
+ if (!markAllAsUnread)
+ flags |= DBEF_READ;
+
for (int i = json_size(conversations); i >= 0; i--)
{
JSONNODE *message = json_at(conversations, i);
@@ -60,7 +66,6 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
{
if (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))
{
- int flags = DBEF_UTF | DBEF_READ;
bool isMe = IsMe(skypename);
if (isMe)
@@ -105,7 +110,6 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
int iType = 3, iDuration = 0;
ptrA skypename(ContactUrlToName(from));
bool isMe = IsMe(skypename);
- int flags = DBEF_UTF | DBEF_READ;
if (isMe)
flags |= DBEF_SENT;
HXML xml = xi.parseString(ptrT(mir_a2t(content)), 0, _T("partlist"));
@@ -164,7 +168,7 @@ void CSkypeProto::OnGetServerHistory(const NETLIBHTTPREQUEST *response)
msg.Empty();
msg.AppendFormat("%s:\n\t%s: %s\n\t%s: %d %s", Translate("File transfer"), Translate("File name"), fileName, Translate("Size"), fileSize , Translate("bytes"));
- AddMessageToDb(hContact, timestamp, DBEF_UTF | DBEF_READ, clientMsgId, msg.GetBuffer());
+ AddMessageToDb(hContact, timestamp, flags, clientMsgId, msg.GetBuffer());
}
}