summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/connection.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-07-05 17:58:45 +0000
committerRobert Pösel <robyer@seznam.cz>2016-07-05 17:58:45 +0000
commit21811cedec44836942fc07977634c868d9045cf5 (patch)
treede84827a684f817751e45ccd1964c833ca0f27ea /protocols/FacebookRM/src/connection.cpp
parent94ed647bd8f3c21baf568c1fe46e797f68b16e6f (diff)
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
Diffstat (limited to 'protocols/FacebookRM/src/connection.cpp')
-rw-r--r--protocols/FacebookRM/src/connection.cpp10
1 files changed, 10 insertions, 0 deletions
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);