summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-09-04 14:05:56 +0000
committerRobert Pösel <robyer@seznam.cz>2014-09-04 14:05:56 +0000
commit71b61f966447f5ee8b0c4329d74ce0c8b3e693ab (patch)
tree36ec068cd99ffdf2a6a02e5e07052bd2cfb950e8
parentd157f5cb23f30eb6c6e914868416371608528d81 (diff)
Facebook: Return back workaround for weird versions of Facebook (removed in r10329)
git-svn-id: http://svn.miranda-ng.org/main/trunk@10370 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/FacebookRM/src/communication.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp
index cc6eef0292..6020de8ba7 100644
--- a/protocols/FacebookRM/src/communication.cpp
+++ b/protocols/FacebookRM/src/communication.cpp
@@ -995,6 +995,10 @@ bool facebook_client::home()
// Get real name (for mobile FB version since 27.8.2014)
this->self_.real_name = utils::text::source_get_value(&resp.data, 5, "id=\"root", "</a>", "<div", ">", "<img");
+ // Try to get name again, if we've got some some weird version of Facebook
+ if (this->self_.real_name.empty())
+ this->self_.real_name = utils::text::source_get_value(&resp.data, 4, "id=\"root", "<strong", ">", "</strong>");
+
// Get and strip optional nickname
std::string::size_type pos = this->self_.real_name.find("<span class=\"alternate_name\">");
if (pos != std::string::npos) {