summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/messages.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-11-17 11:17:08 +0000
committerRobert Pösel <robyer@seznam.cz>2014-11-17 11:17:08 +0000
commitb2a0ad599ee41955d63315113b02e3dbe7d20f0b (patch)
tree8d2a1b722d5f2b583994ee7284638a968ead4c1c /protocols/FacebookRM/src/messages.cpp
parent03eb88d15e89fcbd4eed39c64b607b0cbb3605fe (diff)
Facebook: Fix receiving user messages and marking them as read for some people; version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@11002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r--protocols/FacebookRM/src/messages.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 72e4e3487c..08b72eab59 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -180,11 +180,12 @@ void FacebookProto::ReadMessageWorker(void *p)
return;
// mark message read (also send seen info)
- ptrA tid( getStringA(hContact, FACEBOOK_KEY_TID));
- if (tid == NULL)
+ const char *value = (isChatRoom(hContact) ? FACEBOOK_KEY_TID : FACEBOOK_KEY_ID);
+ ptrA id( getStringA(hContact, value));
+ if (id == NULL)
return;
- std::string data = "ids[" + utils::url::encode(std::string(tid)) + "]=true";
+ std::string data = "ids[" + utils::url::encode(std::string(id)) + "]=true";
data += "&fb_dtsg=" + facy.dtsg_;
data += "&__user=" + facy.self_.user_id;
data += "&__a=1&__dyn=&__req=&ttstamp=0";