summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-05-20 13:26:29 +0000
committerRobert Pösel <robyer@seznam.cz>2013-05-20 13:26:29 +0000
commitb330de2b0bcf4d09a417c0ef154c3419b6930316 (patch)
tree962eb53ad945a1a26204f4f2d738bb94354d3d2b /protocols/FacebookRM/src/proto.cpp
parent7e065653a2ffe78094357f6838a5c15ac0fda885 (diff)
Facebook: Marking notifications as read with right click on popup.
git-svn-id: http://svn.miranda-ng.org/main/trunk@4760 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r--protocols/FacebookRM/src/proto.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index c5ecfea06d..03fd9c722e 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -628,3 +628,19 @@ void FacebookProto::OpenUrl(std::string url)
ptrT data = mir_utf8decodeT(url.c_str());
CallService(MS_UTILS_OPENURL, (WPARAM)OUF_TCHAR, (LPARAM)data);
}
+
+void FacebookProto::ReadNotificationWorker(void *p)
+{
+ if (p == NULL)
+ return;
+
+ std::string *id = static_cast<std::string*>(p);
+
+ std::string data = "seen=0&asyncSignal=&__dyn=&__req=a&alert_ids%5B0%5D=" + *id;
+ data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
+ data += "&__user=" + facy.self_.user_id;
+
+ facy.flap(FACEBOOK_REQUEST_NOTIFICATIONS_READ, NULL, &data);
+
+ delete p;
+} \ No newline at end of file