From 3506c2bc0bb148120db8e8c7c6a07cf3e683cc50 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Sun, 10 May 2015 09:28:16 +0000 Subject: SkypeWeb: Mark messsges as read rework. git-svn-id: http://svn.miranda-ng.org/main/trunk@13504 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/SkypeWeb/src/skype_messages.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'protocols/SkypeWeb/src/skype_messages.cpp') diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp index 1b65a34a9f..e47f8e248a 100644 --- a/protocols/SkypeWeb/src/skype_messages.cpp +++ b/protocols/SkypeWeb/src/skype_messages.cpp @@ -307,17 +307,17 @@ void CSkypeProto::OnPrivateMessageEvent(JSONNODE *node) } else if (!mir_strcmpi(messageType, "RichText/Contacts")){} - if (clientMsgId && (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))) - { - PushRequest(new MarkMessageReadRequest(skypename, RegToken, _ttoi(json_as_string(json_get(node, "id"))), timestamp, false, Server)); - } + //if (clientMsgId && (!mir_strcmpi(messageType, "Text") || !mir_strcmpi(messageType, "RichText"))) + //{ + // PushRequest(new MarkMessageReadRequest(skypename, RegToken, _ttoi(json_as_string(json_get(node, "id"))), timestamp, false, Server)); + //} } -int CSkypeProto::OnDbEventRead(WPARAM, LPARAM) +int CSkypeProto::OnDbEventRead(WPARAM hContact, LPARAM hDbEvent) { debugLogA(__FUNCTION__); - //if (IsOnline() && !isChatRoom(hContact) && !mir_strcmp(GetContactProto(hContact), m_szModuleName)) - // MarkMessagesRead(hContact, hDbEvent); + if (IsOnline() && !isChatRoom(hContact) && !mir_strcmp(GetContactProto(hContact), m_szModuleName)) + MarkMessagesRead(hContact, hDbEvent); return 0; } @@ -331,5 +331,5 @@ void CSkypeProto::MarkMessagesRead(MCONTACT hContact, MEVENT hDbEvent) time_t timestamp = dbei.timestamp; - PushRequest(new MarkMessageReadRequest(username, RegToken, time(NULL)+60/*it should be rewritten*/, timestamp, false, Server)); + PushRequest(new MarkMessageReadRequest(username, RegToken, timestamp, timestamp, false, Server)); } \ No newline at end of file -- cgit v1.2.3