From a641f9cd9a4c9e11cf0eae41ba32ac5d40dce83c 2013-07-07 10:20:51 From: vitalyster Date: 2013-07-07 10:20:51 Subject: [PATCH] Merge branch 'master' of https://github.com/hanzz/libtransport into twitcurl_update --- diff --git a/backends/twitter/TwitterPlugin.cpp b/backends/twitter/TwitterPlugin.cpp index e742d9dc2809191e853a59e24f83434d13a6cdae..99a103d6bb6a6ab4b1a0a5d5e4d25b747f2ac9da 100644 --- a/backends/twitter/TwitterPlugin.cpp +++ b/backends/twitter/TwitterPlugin.cpp @@ -76,8 +76,8 @@ TwitterPlugin::TwitterPlugin(Config *config, Swift::SimpleEventLoop *loop, Stora tp = new ThreadPool(loop_, 10); - tweet_timer = m_factories->getTimerFactory()->createTimer(60000); - message_timer = m_factories->getTimerFactory()->createTimer(60000); + tweet_timer = m_factories->getTimerFactory()->createTimer(90000); + message_timer = m_factories->getTimerFactory()->createTimer(90000); tweet_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForTweets, this)); message_timer->onTick.connect(boost::bind(&TwitterPlugin::pollForDirectMessages, this)); diff --git a/backends/twitter/TwitterResponseParser.cpp b/backends/twitter/TwitterResponseParser.cpp index 9c927ea94bce6b545eb538c177239352960241db..7d87e9f80c70f037955778727bab3c07caf11b83 100644 --- a/backends/twitter/TwitterResponseParser.cpp +++ b/backends/twitter/TwitterResponseParser.cpp @@ -50,9 +50,9 @@ EmbeddedStatus getEmbeddedStatus(const rapidjson::Value &element) status.setTweet( unescape ( std::string( element[TwitterReponseTypes::text.c_str()].GetString() ) ) ); status.setTruncated( element[TwitterReponseTypes::truncated.c_str()].GetBool()); status.setReplyToStatusID( element[TwitterReponseTypes::in_reply_to_status_id.c_str()].IsNull() ? -"" : std::string(element[TwitterReponseTypes::in_reply_to_status_id.c_str()].GetString()) ); +"" : std::to_string(element[TwitterReponseTypes::in_reply_to_status_id.c_str()].GetInt64()) ); status.setReplyToUserID( element[TwitterReponseTypes::in_reply_to_user_id.c_str()].IsNull() ? -"" : std::string(element[TwitterReponseTypes::in_reply_to_user_id.c_str()].GetString()) ); +"" : std::to_string(element[TwitterReponseTypes::in_reply_to_user_id.c_str()].GetInt64()) ); status.setReplyToScreenName( element[TwitterReponseTypes::in_reply_to_screen_name.c_str()].IsNull() ? "" : std::string(element[TwitterReponseTypes::in_reply_to_screen_name.c_str()].GetString()) ); status.setRetweetCount( element[TwitterReponseTypes::retweet_count.c_str()].GetInt64() ); @@ -88,9 +88,9 @@ Status getStatus(const rapidjson::Value &element) status.setTweet( unescape ( std::string( element[TwitterReponseTypes::text.c_str()].GetString() ) ) ); status.setTruncated( element[TwitterReponseTypes::truncated.c_str()].GetBool()); status.setReplyToStatusID( element[TwitterReponseTypes::in_reply_to_status_id.c_str()].IsNull() ? -"" : std::string(element[TwitterReponseTypes::in_reply_to_status_id.c_str()].GetString()) ); +"" : std::to_string(element[TwitterReponseTypes::in_reply_to_status_id.c_str()].GetInt64()) ); status.setReplyToUserID( element[TwitterReponseTypes::in_reply_to_user_id.c_str()].IsNull() ? -"" : std::string(element[TwitterReponseTypes::in_reply_to_user_id.c_str()].GetString()) ); +"" : std::to_string(element[TwitterReponseTypes::in_reply_to_user_id.c_str()].GetInt64()) ); status.setReplyToScreenName( element[TwitterReponseTypes::in_reply_to_screen_name.c_str()].IsNull() ? "" : std::string(element[TwitterReponseTypes::in_reply_to_screen_name.c_str()].GetString()) ); status.setUserData( getUser(element[TwitterReponseTypes::user.c_str()]) );