From 310f2fd36cc0d1d736ea9c061d3ef0b928c6e360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Thu, 29 May 2014 13:38:18 +0000 Subject: Facebook: Fixed receiving messages (don't mark them as read when they aren't) git-svn-id: http://svn.miranda-ng.org/main/trunk@9342 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/process.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'protocols') diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index c588e6c192..d57ae2d838 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -639,12 +639,9 @@ void FacebookProto::ReceiveMessages(std::vector messages, boo ParseSmileys(messages[i]->message_text, hContact); - if (messages[i]->isIncoming) { + if (messages[i]->isIncoming && messages[i]->isUnread) { PROTORECVEVENT recv = { 0 }; - recv.flags = PREF_UTF | PREF_CREATEREAD; - if (!messages[i]->isUnread) - recv.flags |= PREF_CREATEREAD; - + recv.flags = PREF_UTF; recv.szMessage = const_cast(messages[i]->message_text.c_str()); recv.timestamp = timestamp; ProtoChainRecvMsg(hContact, &recv); @@ -652,8 +649,12 @@ void FacebookProto::ReceiveMessages(std::vector messages, boo DBEVENTINFO dbei = { 0 }; dbei.cbSize = sizeof(dbei); dbei.eventType = EVENTTYPE_MESSAGE; - dbei.flags = DBEF_SENT | DBEF_UTF; - //if (!messages[i]->isUnread) // sent messages are always read + dbei.flags = DBEF_UTF; + + if (!messages[i]->isIncoming) + dbei.flags |= DBEF_SENT | DBEF_READ; // sent messages are always read + + if (!messages[i]->isUnread) dbei.flags |= DBEF_READ; dbei.szModule = m_szModuleName; -- cgit v1.2.3