summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/messages.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2017-04-23 13:51:10 +0200
committerRobert Pösel <robyer@seznam.cz>2017-04-23 15:20:17 +0200
commitf46b52644c9aa53f43bb3a828b31c0549007d9df (patch)
tree3b7d4ac6b98d87ed578b9bb8ef7dcaab956caed8 /protocols/FacebookRM/src/messages.cpp
parenta78ba173862dbc4a3a6565257135e8b8c354cdc4 (diff)
Facebook: New option to not send typing when invisible
Enabling it helps to not being marked as "active 1 min ago" by Facebook.
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r--protocols/FacebookRM/src/messages.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 1c5e786f9a..a2ada53862 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -133,6 +133,13 @@ void FacebookProto::SendTypingWorker(void *p)
send_typing *typing = static_cast<send_typing*>(p);
+ // Don't send typing notifications when we are invisible and user don't want that
+ bool noTypingWhenInvisible = getBool(FACEBOOK_KEY_NO_TYPING_WHEN_INVISIBLE, DEFAULT_NO_TYPING_WHEN_INVISIBLE);
+ if (noTypingWhenInvisible && isInvisible()) {
+ delete typing;
+ return;
+ }
+
// Dont send typing notifications to not friends - Facebook won't give them that info anyway
if (!isChatRoom(typing->hContact) && getWord(typing->hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND) {
delete typing;