From 9b2a534f778e0d5114fd0c72878421bbc485b309 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 17 Nov 2013 23:36:16 +0000 Subject: 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 --- protocols/FacebookRM/src/db.h | 1 + protocols/FacebookRM/src/messages.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'protocols/FacebookRM') 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 . #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(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)); -- cgit v1.2.3