summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-07-25 18:50:12 +0000
committerRobert Pösel <robyer@seznam.cz>2013-07-25 18:50:12 +0000
commit125a25c86eed41352d45eb8fb6f994f65700c3ec (patch)
tree7605c4763aaf26968c7e18b1a66bcab67e845b74 /protocols
parent9d4577f64db5cd58b2157d3bcccb972d774364de (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')
-rw-r--r--protocols/FacebookRM/res/facebook.rc7
-rw-r--r--protocols/FacebookRM/src/db.h1
-rw-r--r--protocols/FacebookRM/src/dialogs.cpp2
-rw-r--r--protocols/FacebookRM/src/messages.cpp29
4 files changed, 10 insertions, 29 deletions
diff --git a/protocols/FacebookRM/res/facebook.rc b/protocols/FacebookRM/res/facebook.rc
index 531fc4ac5a..14868ab324 100644
--- a/protocols/FacebookRM/res/facebook.rc
+++ b/protocols/FacebookRM/res/facebook.rc
@@ -82,7 +82,7 @@ EXSTYLE WS_EX_TOPMOST
CAPTION "What's on your mind?"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- LTEXT "Text:",IDC_STATIC,4,6,44,8,0,WS_EX_RIGHT
+ LTEXT "Text:",IDC_STATIC,4,6,44,8,0,WS_EX_RIGHT
EDITTEXT IDC_MINDMSG,53,4,210,36,ES_MULTILINE | ES_AUTOVSCROLL | ES_WANTRETURN | WS_VSCROLL
LTEXT "420",IDC_CHARACTERS,4,30,43,10,0,WS_EX_RIGHT
LTEXT "Place:",IDC_STATIC,4,46,44,8,0,WS_EX_RIGHT
@@ -177,8 +177,6 @@ BEGIN
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,95,267,10
CONTROL "Use local time for received messages",IDC_USE_LOCAL_TIME,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,108,267,10
- CONTROL "Send ""Seen"" info when marking messages as read",IDC_SEND_SEEN,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,17,122,267,10
COMBOBOX IDC_URL_SERVER,156,135,96,59,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Use this server for opening links:",IDC_STATIC,17,137,135,8
END
@@ -272,8 +270,7 @@ END
//
// Generated from the TEXTINCLUDE 3 resource.
//
-
-
+
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
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)