summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/FacebookRM/src/db.h1
-rw-r--r--protocols/FacebookRM/src/messages.cpp5
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));