diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-07-25 18:50:12 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-07-25 18:50:12 +0000 |
commit | 125a25c86eed41352d45eb8fb6f994f65700c3ec (patch) | |
tree | 7605c4763aaf26968c7e18b1a66bcab67e845b74 /protocols/FacebookRM/src | |
parent | 9d4577f64db5cd58b2157d3bcccb972d774364de (diff) |
Facebook: Removed option to "Send 'Seen' info", not it is sent always (Facebook removed support for old request)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5484 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/db.h | 1 | ||||
-rw-r--r-- | protocols/FacebookRM/src/dialogs.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 29 |
3 files changed, 8 insertions, 24 deletions
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h index 59c575da46..5ce0a4751f 100644 --- a/protocols/FacebookRM/src/db.h +++ b/protocols/FacebookRM/src/db.h @@ -48,7 +48,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define FACEBOOK_KEY_CUSTOM_SMILEYS "CustomSmileys"
#define FACEBOOK_KEY_MESSAGE_ID "LastMessageId"
#define FACEBOOK_KEY_SERVER_TYPE "ServerType"
-#define FACEBOOK_KEY_MARK_READ "MarkRead"
#define FACEBOOK_KEY_LOCAL_TIMESTAMP "UseLocalTimestamp"
#define FACEBOOK_KEY_PRIVACY_TYPE "PrivacyType"
#define FACEBOOK_KEY_PLACE "Place"
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index d4bf908282..a0b7e0a066 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -327,7 +327,6 @@ INT_PTR CALLBACK FBOptionsAdvancedProc(HWND hwnd, UINT message, WPARAM wparam, L LoadDBCheckState(proto, hwnd, IDC_CUSTOM_SMILEYS, FACEBOOK_KEY_CUSTOM_SMILEYS, DEFAULT_CUSTOM_SMILEYS);
LoadDBCheckState(proto, hwnd, IDC_USE_LOCAL_TIME, FACEBOOK_KEY_LOCAL_TIMESTAMP, 0);
- LoadDBCheckState(proto, hwnd, IDC_SEND_SEEN, FACEBOOK_KEY_MARK_READ, 1);
EnableWindow(GetDlgItem(hwnd, IDC_SECURE_CHANNEL), IsDlgButtonChecked(hwnd, IDC_SECURE));
@@ -359,7 +358,6 @@ INT_PTR CALLBACK FBOptionsAdvancedProc(HWND hwnd, UINT message, WPARAM wparam, L StoreDBCheckState(proto, hwnd, IDC_MAP_STATUSES, FACEBOOK_KEY_MAP_STATUSES);
StoreDBCheckState(proto, hwnd, IDC_CUSTOM_SMILEYS, FACEBOOK_KEY_CUSTOM_SMILEYS);
StoreDBCheckState(proto, hwnd, IDC_USE_LOCAL_TIME, FACEBOOK_KEY_LOCAL_TIMESTAMP);
- StoreDBCheckState(proto, hwnd, IDC_SEND_SEEN, FACEBOOK_KEY_MARK_READ);
BOOL setStatus = IsDlgButtonChecked(hwnd, IDC_SET_STATUS);
BOOL setStatusOld = proto->getByte(FACEBOOK_KEY_SET_MIRANDA_STATUS, DEFAULT_SET_MIRANDA_STATUS);
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 3fe97730f5..b5fd264f95 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -169,29 +169,16 @@ void FacebookProto::ReadMessageWorker(void *p) HANDLE hContact = static_cast<HANDLE>(p);
- if (!getByte(FACEBOOK_KEY_MARK_READ, 1)) {
- // old variant - no seen info updated
- ptrA id( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID));
- if (id == NULL) return;
+ // mark message read (also send seen info)
+ ptrA mid( getStringA(hContact, FACEBOOK_KEY_MESSAGE_ID));
+ if (mid == NULL) return;
- std::string data = "action=chatMarkRead";
- data += "&other_user=" + std::string(id);
- data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
- data += "&lsd=&__user=" + facy.self_.user_id;
-
- facy.flap(REQUEST_ASYNC, &data);
- } else {
- // new variant - with seen info
- ptrA mid( getStringA(hContact, FACEBOOK_KEY_MESSAGE_ID));
- if (mid == NULL) return;
-
- std::string data = "ids[" + std::string(mid) + "]=true";
- data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
- data += "&__user=" + facy.self_.user_id;
- data += "&__a=1&__dyn=&__req=j&phstamp=0";
+ std::string data = "ids[" + std::string(mid) + "]=true";
+ data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
+ data += "&__user=" + facy.self_.user_id;
+ data += "&__a=1&__dyn=&__req=&ttstamp=0";
- facy.flap(REQUEST_MARK_READ, &data);
- }
+ facy.flap(REQUEST_MARK_READ, &data);
}
void FacebookProto::ParseSmileys(std::string message, HANDLE hContact)
|