diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-05-20 13:26:29 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-05-20 13:26:29 +0000 |
commit | b330de2b0bcf4d09a417c0ef154c3419b6930316 (patch) | |
tree | 962eb53ad945a1a26204f4f2d738bb94354d3d2b /protocols/FacebookRM/src/communication.cpp | |
parent | 7e065653a2ffe78094357f6838a5c15ac0fda885 (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/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 793bef85ee..c92a1c7b5b 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -246,6 +246,7 @@ DWORD facebook_client::choose_security_level(int request_type) // case FACEBOOK_REQUEST_POKE:
// case FACEBOOK_REQUEST_ASYNC:
// case FACEBOOK_REQUEST_MARK_READ:
+// case FACEBOOK_REQUEST_NOTIFICATIONS_READ:
// case FACEBOOK_REQUEST_UNREAD_MESSAGES:
// case FACEBOOK_REQUEST_TYPING_SEND:
default:
@@ -268,6 +269,7 @@ int facebook_client::choose_method(int request_type) case FACEBOOK_REQUEST_POKE:
case FACEBOOK_REQUEST_ASYNC:
case FACEBOOK_REQUEST_MARK_READ:
+ case FACEBOOK_REQUEST_NOTIFICATIONS_READ:
case FACEBOOK_REQUEST_TYPING_SEND:
case FACEBOOK_REQUEST_LOGOUT:
case FACEBOOK_REQUEST_DELETE_FRIEND:
@@ -336,6 +338,7 @@ std::string facebook_client::choose_server(int request_type, std::string* data, // case FACEBOOK_REQUEST_POKE:
// case FACEBOOK_REQUEST_ASYNC:
// case FACEBOOK_REQUEST_MARK_READ:
+// case FACEBOOK_REQUEST_NOTIFICATIONS_READ:
// case FACEBOOK_REQUEST_TYPING_SEND:
// case FACEBOOK_REQUEST_SETUP_MACHINE:
// case FACEBOOK_REQUEST_DELETE_FRIEND:
@@ -496,6 +499,15 @@ std::string facebook_client::choose_action(int request_type, std::string* data, case FACEBOOK_REQUEST_MARK_READ:
return "/ajax/mercury/change_read_status.php?__a=1";
+ case FACEBOOK_REQUEST_NOTIFICATIONS_READ:
+ {
+ std::string action = "/ajax/notifications/mark_read.php?__a=1";
+ if (get_data != NULL) {
+ action += "&" + (*get_data);
+ }
+ return action;
+ }
+
case FACEBOOK_REQUEST_TYPING_SEND:
return "/ajax/messaging/typ.php?__a=1";
@@ -847,7 +859,7 @@ bool facebook_client::chat_state(bool online) std::string data = (online ? "visibility=1" : "visibility=0");
data += "&window_id=0";
- data += "&fb_dtsg=" + this->dtsg_;
+ data += "&fb_dtsg=" + (dtsg_.length() ? dtsg_ : "0");
data += "&phstamp=0&__user=" + self_.user_id;
http::response resp = flap(FACEBOOK_REQUEST_VISIBILITY, &data);
|