From 6faf06b68696ee329a125b95e7d65475b1fb2d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 9 Sep 2012 23:41:51 +0000 Subject: Facebook: Fixed loading/updating own avatar. git-svn-id: http://svn.miranda-ng.org/main/trunk@1555 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/communication.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols') 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()); -- cgit v1.2.3