summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-04-05 09:42:25 +0000
committerRobert Pösel <robyer@seznam.cz>2014-04-05 09:42:25 +0000
commitfed159c8771f96f2c35d2d8b1d0d5dc71957c894 (patch)
tree6ce5a3e47f2b29ac85599e56acbdb88c51fbb295
parente1ffadefb3bb47c1201091572c746ffd2396630f (diff)
Facebook: Fix text info when Poke
git-svn-id: http://svn.miranda-ng.org/main/trunk@8860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--protocols/FacebookRM/src/contacts.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index 1135c3fd6e..ea45210d80 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -377,14 +377,16 @@ void FacebookProto::SendPokeWorker(void *p)
http::response resp = facy.flap(REQUEST_POKE, &data);
if (resp.data.find("\"payload\":null", 0) != std::string::npos) {
- std::string message = utils::text::source_get_value(&resp.data, 3, "__html\":\"", "\\/button>", "\"}");
+ resp.data = utils::text::slashu_to_utf8(
+ utils::text::source_get_value(&resp.data, 2, "__html\":\"", "\"}"));
- if (message.empty()) // message has different format, try to get whole message
- message = utils::text::source_get_value(&resp.data, 2, "__html\":\"", "\"}");
+ std::string message = utils::text::source_get_value(&resp.data, 4, "<img", "<div", ">", "<\\/div>");
+
+ if (message.empty()) // message has different format, show whole message
+ message = resp.data;
message = utils::text::special_expressions_decode(
- utils::text::remove_html(
- utils::text::slashu_to_utf8(message)));
+ utils::text::remove_html(message));
ptrT tmessage( mir_utf8decodeT(message.c_str()));
NotifyEvent(m_tszUserName, tmessage, NULL, FACEBOOK_EVENT_OTHER);