diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-09-09 23:23:12 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-09-09 23:23:12 +0000 |
commit | 53998ab8b091c2830bc8b4d801099795dcf80c1b (patch) | |
tree | bed79cf71831ac642ff82e92032685cbac570791 | |
parent | af3c22abb7eae4142c6c9aff1faf985bc9b3c76f (diff) |
Facebook: Fixed changing status in Miranda after status change on web.
git-svn-id: http://svn.miranda-ng.org/main/trunk@1553 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/FacebookRM/json.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/protocols/FacebookRM/json.cpp b/protocols/FacebookRM/json.cpp index b9bf8915a8..e79c6966cd 100644 --- a/protocols/FacebookRM/json.cpp +++ b/protocols/FacebookRM/json.cpp @@ -514,11 +514,17 @@ int facebook_json_parser::parse_messages( void* data, std::vector< facebook_mess else
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
}
- else if ( type.Value( ) == "visibility" ) // change of chat status
+ else if ( type.Value( ) == "privacy_changed")
{
- const Boolean visibility = objMember["visibility"];
- proto->Log(" Requested chat switch to %s", visibility ? "Online" : "Offline");
- proto->SetStatus( visibility ? ID_STATUS_ONLINE : ID_STATUS_INVISIBLE );
+ const String& event_type = objMember["event"];
+ const Object& event_data = objMember["data"];
+
+ if ( event_type.Value( ) == "visibility_update" )
+ { // change of chat status
+ const Boolean visibility = event_data["visibility"];
+ proto->Log(" Requested chat switch to %s", visibility ? "Online" : "Offline");
+ proto->SetStatus( visibility ? ID_STATUS_ONLINE : ID_STATUS_INVISIBLE );
+ }
}
else
continue;
|