summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/connection.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2015-12-12 08:21:26 +0000
committerRobert Pösel <robyer@seznam.cz>2015-12-12 08:21:26 +0000
commitb0b34d3e9627301f77a6e225dc04465dae998d95 (patch)
treebfb53dc39018137608faca059cfb7d381acb7fdd /protocols/FacebookRM/src/connection.cpp
parent09a54576390417d41ae37b574047466b260cfd72 (diff)
Facebook: Support for "away" status (behaves just like being idle in Miranda); version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@15842 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/connection.cpp')
-rw-r--r--protocols/FacebookRM/src/connection.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/connection.cpp b/protocols/FacebookRM/src/connection.cpp
index 02d267e375..1406a497f9 100644
--- a/protocols/FacebookRM/src/connection.cpp
+++ b/protocols/FacebookRM/src/connection.cpp
@@ -160,6 +160,9 @@ void FacebookProto::ChangeStatus(void*)
m_invisible = (new_status == ID_STATUS_INVISIBLE);
+ // Remember time of switching to away (and if we are idle already, use the idle time)
+ m_awayTS = (new_status == ID_STATUS_AWAY ? (m_idleTS > 0 ? m_idleTS : ::time(NULL)) : 0);
+
facy.chat_state(!m_invisible);
ForkThread(&FacebookProto::ProcessBuddyList, NULL);