diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-11-09 15:37:34 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-11-09 15:37:34 +0000 |
commit | 0b67a54741236361d1ad1adf557e73fd80d1eea9 (patch) | |
tree | b71ce86076216c269420a833689f53a1bdb7d858 /protocols/FacebookRM/src/json.cpp | |
parent | 336718667f42e964f4deeb54f60d42ff392457d4 (diff) |
Facebook: Show contacts on mobile with different MirVer (support for MobileState plugin)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2259 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r-- | protocols/FacebookRM/src/json.cpp | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 2c03c36a7d..eaf33a083e 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -56,28 +56,25 @@ int facebook_json_parser::parse_buddy_list( void* data, List::List< facebook_use for ( List::Item< facebook_user >* i = buddy_list->begin( ); i != NULL; i = i->next ) {
i->data->status_id = ID_STATUS_OFFLINE;
}
-
+
+ const Array& mobileFriends = objRoot["payload"]["buddy_list"]["mobile_friends"];
// Find mobile friends
- if (DBGetContactSettingByte(NULL,proto->m_szModuleName,FACEBOOK_KEY_LOAD_MOBILE, DEFAULT_LOAD_MOBILE)) {
- const Array& mobileFriends = objRoot["payload"]["buddy_list"]["mobile_friends"];
-
- for ( Array::const_iterator buddy( mobileFriends.Begin()); buddy != mobileFriends.End(); ++buddy) {
- const Number& member = *buddy;
- char was_id[32];
- lltoa( member.Value(), was_id, 10 );
+ for ( Array::const_iterator buddy( mobileFriends.Begin()); buddy != mobileFriends.End(); ++buddy) {
+ const Number& member = *buddy;
+ char was_id[32];
+ lltoa( member.Value(), was_id, 10 );
- std::string id = was_id;
- if (!id.empty()) {
- current = buddy_list->find( id );
+ std::string id = was_id;
+ if (!id.empty()) {
+ current = buddy_list->find( id );
- if ( current == NULL) {
- buddy_list->insert( std::make_pair( id, new facebook_user( )) );
- current = buddy_list->find( id );
- current->user_id = id;
- }
-
- current->status_id = ID_STATUS_ONTHEPHONE;
+ if ( current == NULL) {
+ buddy_list->insert( std::make_pair( id, new facebook_user( )) );
+ current = buddy_list->find( id );
+ current->user_id = id;
}
+
+ current->status_id = ID_STATUS_ONTHEPHONE;
}
}
|