From 054110d7777848d931e22137ed2e4072334c6d58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sat, 14 Feb 2015 16:30:26 +0000 Subject: Facebook: Fix (hopefully) loading own avatar for some people with weird FB "version"; version bump git-svn-id: http://svn.miranda-ng.org/main/trunk@12104 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/communication.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'protocols/FacebookRM/src/communication.cpp') diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index c9f9bfd9e5..f366814d60 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -1078,6 +1078,17 @@ bool facebook_client::home() // Get avatar this->self_.image_url = utils::text::source_get_value(&resp.data, 3, "id=\"root", "self_.image_url.empty()) { + this->self_.image_url = utils::text::source_get_value(&resp.data, 3, "id=\"root", "/photo.php?", "\""); + + // Prepare this special url (not direct image url) to be handled correctly in CheckAvatarChange() + // It must contain "/" at the beginning and also shouldn't contain "?" as parameters after that are stripped + if (!this->self_.image_url.empty()) + this->self_.image_url = "/" + this->self_.image_url; + } + parent->debugLogA(" Got self avatar: %s", this->self_.image_url.c_str()); parent->CheckAvatarChange(NULL, this->self_.image_url); -- cgit v1.2.3