summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/json.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-07-05 17:58:52 +0000
committerRobert Pösel <robyer@seznam.cz>2016-07-05 17:58:52 +0000
commit3549466bfab1c6fdb20d8eb55fe0124f2c6704a7 (patch)
treeabeae6ada5faf22abf3f146bbc763fd2291289e6 /protocols/FacebookRM/src/json.cpp
parentb17412619a1706782330e116c6c9e5dd00e39dde (diff)
Facebook: Rework popup behavior and options page
Now items in status menu/services are much more useful, as you can disable automatic loading of newsfeeds/notifications/on this day, but you can trigger it manually via status menu/services menu git-svn-id: http://svn.miranda-ng.org/main/trunk@17063 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/json.cpp')
-rw-r--r--protocols/FacebookRM/src/json.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp
index c0c3e02845..43d1fe34b1 100644
--- a/protocols/FacebookRM/src/json.cpp
+++ b/protocols/FacebookRM/src/json.cpp
@@ -586,7 +586,10 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo
std::string url = href_.as_string();
std::string alert_id = alertId_.as_string();
- proto->NotifyEvent(proto->m_tszUserName, ptrT(mir_utf8decodeT(text.c_str())), NULL, FACEBOOK_EVENT_FRIENDSHIP, &url, alert_id.empty() ? NULL : &alert_id);
+ // Notify it, if user wants to be notified
+ if (proto->getByte(FACEBOOK_KEY_EVENT_FRIENDSHIP_ENABLE, DEFAULT_EVENT_FRIENDSHIP_ENABLE)) {
+ proto->NotifyEvent(proto->m_tszUserName, ptrT(mir_utf8decodeT(text.c_str())), NULL, FACEBOOK_EVENT_FRIENDSHIP, &url, alert_id.empty() ? NULL : &alert_id);
+ }
}
}
else if (t == "jewel_requests_add") {
@@ -867,6 +870,9 @@ int facebook_json_parser::parse_messages(std::string *pData, std::vector<faceboo
}
}
} else if (t == "ticker_update:home") {
+ if (!proto->getByte(FACEBOOK_KEY_EVENT_TICKER_ENABLE, DEFAULT_EVENT_TICKER_ENABLE))
+ continue;
+
const JSONNode &actor_ = (*it)["actor"];
const JSONNode &story_ = (*it)["story_xhp"];