summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/chat.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-07-15 21:38:32 +0000
committerRobert Pösel <robyer@seznam.cz>2014-07-15 21:38:32 +0000
commit24145eb51f09d7f97c7ed3725bacb552130b9da0 (patch)
treef4a675eab4579402cd270589ca036ac547ec4dc2 /protocols/FacebookRM/src/chat.cpp
parent10a205a4c77765d6300e16e3b202dfef97a3e45c (diff)
Facebook: Option to not open chats on creaton
git-svn-id: http://svn.miranda-ng.org/main/trunk@9819 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/chat.cpp')
-rw-r--r--protocols/FacebookRM/src/chat.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index ac909fa2ee..872485107e 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -235,10 +235,12 @@ void FacebookProto::AddChat(const TCHAR *tid, const TCHAR *tname)
gce.time = ::time(NULL);
gce.pDest = &gcd;
+ bool hideChats = getBool(FACEBOOK_KEY_HIDE_CHATS, DEFAULT_HIDE_CHATS);
+
// Add self contact
AddChatContact(tid, facy.self_.user_id.c_str(), facy.self_.real_name.c_str());
- CallServiceSync(MS_GC_EVENT,SESSION_INITDONE,reinterpret_cast<LPARAM>(&gce));
- CallServiceSync(MS_GC_EVENT,SESSION_ONLINE, reinterpret_cast<LPARAM>(&gce));
+ CallServiceSync(MS_GC_EVENT, (hideChats ? WINDOW_HIDDEN : SESSION_INITDONE), reinterpret_cast<LPARAM>(&gce));
+ CallServiceSync(MS_GC_EVENT, SESSION_ONLINE, reinterpret_cast<LPARAM>(&gce));
}
INT_PTR FacebookProto::OnJoinChat(WPARAM hContact, LPARAM suppress)