diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-09-09 23:41:51 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-09-09 23:41:51 +0000 |
commit | 6faf06b68696ee329a125b95e7d65475b1fb2d9d (patch) | |
tree | 9a1805c1f4b40fe88883d02f0fcb2e94905e7d8f /protocols/FacebookRM | |
parent | f4c65c1deac3879965e6ead329342afd538bd517 (diff) |
Facebook: Fixed loading/updating own avatar.
git-svn-id: http://svn.miranda-ng.org/main/trunk@1555 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/communication.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/FacebookRM/communication.cpp b/protocols/FacebookRM/communication.cpp index 5f61fee42d..7aa116d653 100644 --- a/protocols/FacebookRM/communication.cpp +++ b/protocols/FacebookRM/communication.cpp @@ -785,9 +785,9 @@ bool facebook_client::home( ) }
// Get avatar
- std::string avatar = utils::text::source_get_value( &resp.data, 3, "class=\\\"fbxWelcomeBoxImg", "src=\\\"", "\\\"" );
- if (avatar.empty())
- avatar = utils::text::source_get_value( &resp.data, 3, "class=\"fbxWelcomeBoxImg", "src=\"", "\"" );
+ std::string avatar = utils::text::source_get_value( &resp.data, 4, "fbxWelcomeBoxImg", "src=", "\"", "\"" );
+ if (avatar[avatar.length()-1] == '\\')
+ avatar = avatar.substr(0, avatar.length()-1);
this->self_.image_url = utils::text::trim( utils::text::special_expressions_decode( avatar ));
parent->Log(" Got self avatar: %s", this->self_.image_url.c_str());
|