diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-11-17 23:36:16 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-11-17 23:36:16 +0000 |
commit | 9b2a534f778e0d5114fd0c72878421bbc485b309 (patch) | |
tree | 31a052ad3e1df392044af8b107c338e893100b01 /protocols/FacebookRM | |
parent | b31c85fadafb41df147ff0c27baa04a23a48a27e (diff) |
Facebook: Added hidden option to keep messages unread (as requested by Guenter Gruene)
Add byte key "KeepUnread" with value 1 to account settings or to particular contact
git-svn-id: http://svn.miranda-ng.org/main/trunk@6933 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/db.h | 1 | ||||
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/db.h b/protocols/FacebookRM/src/db.h index 28cb5555d1..3103070e67 100644 --- a/protocols/FacebookRM/src/db.h +++ b/protocols/FacebookRM/src/db.h @@ -59,6 +59,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define FACEBOOK_KEY_DISABLE_LOGOUT "DisableLogout" // [HIDDEN]
#define FACEBOOK_KEY_LOCALE "Locale" // [HIDDEN] - en_US, cs_CZ, etc.
#define FACEBOOK_KEY_LOCAL_TIMESTAMP_UNREAD "UseLocalTimestampUnread" // [HIDDEN] - 1 = use local timestamp for offline messages
+#define FACEBOOK_KEY_KEEP_UNREAD "KeepUnread" // [HIDDEN] - 1 = don't mark messages as read on server (works globally or per contact)
#define FACEBOOK_KEY_EVENT_NOTIFICATIONS_ENABLE "EventNotificationsEnable"
#define FACEBOOK_KEY_EVENT_FEEDS_ENABLE "EventFeedsEnable"
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index cc75d048dd..e9c1cd4c0e 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -169,8 +169,11 @@ void FacebookProto::ReadMessageWorker(void *p) {
if (p == NULL)
return;
-
+
HANDLE hContact = static_cast<HANDLE>(p);
+
+ if (getBool(FACEBOOK_KEY_KEEP_UNREAD, 0) || getBool(hContact, FACEBOOK_KEY_KEEP_UNREAD, 0))
+ return;
// mark message read (also send seen info)
ptrA mid( getStringA(hContact, FACEBOOK_KEY_MESSAGE_ID));
|