diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-05-29 13:38:18 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-05-29 13:38:18 +0000 |
commit | 310f2fd36cc0d1d736ea9c061d3ef0b928c6e360 (patch) | |
tree | 661765c63a71b578632023e992df8a99adf71f0d /protocols/FacebookRM | |
parent | 173d82c142334fec7d45d3dd170bdaa81d11cc8e (diff) |
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
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
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<facebook_message*> 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<char*>(messages[i]->message_text.c_str()); recv.timestamp = timestamp; ProtoChainRecvMsg(hContact, &recv); @@ -652,8 +649,12 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> 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; |