diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-02-14 16:30:26 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-02-14 16:30:26 +0000 |
commit | 054110d7777848d931e22137ed2e4072334c6d58 (patch) | |
tree | a9ce8c2aacfee522fa9e9b2860c12029c9a04c96 /protocols/FacebookRM/src | |
parent | 638fdb5d710a10ef611f518303823c5b005ce3e4 (diff) |
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
Diffstat (limited to 'protocols/FacebookRM/src')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 11 | ||||
-rw-r--r-- | protocols/FacebookRM/src/version.h | 2 |
2 files changed, 12 insertions, 1 deletions
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", "<img src=\"", "\""); + + // Another attempt to get avatar + if (this->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); diff --git a/protocols/FacebookRM/src/version.h b/protocols/FacebookRM/src/version.h index 794b425e87..f4c9d6f9df 100644 --- a/protocols/FacebookRM/src/version.h +++ b/protocols/FacebookRM/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 2
#define __RELEASE_NUM 10
-#define __BUILD_NUM 0
+#define __BUILD_NUM 1
#include <stdver.h>
|