From 21811cedec44836942fc07977634c868d9045cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 5 Jul 2016 17:58:45 +0000 Subject: Facebook: Set all contacts offline when switching to invisible git-svn-id: http://svn.miranda-ng.org/main/trunk@17060 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/connection.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'protocols/FacebookRM') diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp index 06222249fc..6825732bfd 100644 --- a/protocols/FacebookRM/src/connection.cpp +++ b/protocols/FacebookRM/src/connection.cpp @@ -158,6 +158,16 @@ void FacebookProto::ChangeStatus(void*) ToggleStatusMenuItems(true); debugLogA("*** SignOn complete"); } + else + { // Change between online/away/invisible statuses + if (new_status == ID_STATUS_INVISIBLE) { + // When switching to invisible (from online/away), we need to set all contacts offline as we won't receive no status updates from Facebook + SetAllContactStatuses(ID_STATUS_OFFLINE); + } + else if (old_status == ID_STATUS_INVISIBLE) { + // TODO: When switching from invisible, we should somehow load all the contacts statuses... + } + } m_invisible = (new_status == ID_STATUS_INVISIBLE); -- cgit v1.2.3