summaryrefslogtreecommitdiff
path: root/protocols/Twitter/src/twitter.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-07-03 20:56:56 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-07-03 20:56:56 +0000
commitfee85fe9916e603d9fdd7e6c61e1f3380df59d51 (patch)
treeae164d83ae2d503093c5a77aba5b2efc8311ce45 /protocols/Twitter/src/twitter.cpp
parente3c473aceee0428a0d4ca80024c65953d43b96bd (diff)
Twitter:
- Fixed retweets (broken after r13248) - minor cleantup git-svn-id: http://svn.miranda-ng.org/main/trunk@14486 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Twitter/src/twitter.cpp')
-rw-r--r--protocols/Twitter/src/twitter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/protocols/Twitter/src/twitter.cpp b/protocols/Twitter/src/twitter.cpp
index 5f86e5c64b..ac1cdadbc3 100644
--- a/protocols/Twitter/src/twitter.cpp
+++ b/protocols/Twitter/src/twitter.cpp
@@ -232,9 +232,11 @@ std::vector<twitter_user> twitter::get_statuses(int count, twitter_id id)
// at this point the user will get no tweets and an error popup if the tweet happens to be exactly 140 chars, start with
// "RT @", end in " ...", and notactually be a real retweet. it's possible but unlikely, wish i knew how to get
// the retweet_count variable to work :(
- const JSONNode &pUser2 = pStatus["user"];
+ const JSONNode &pRetweet = pStatus["retweeted_status"];
+ const JSONNode &pUser2 = pRetweet["user"];
+
std::string retweeteesName = pUser2["screen_name"].as_string(); // the user that is being retweeted
- std::string retweetText = pUser2["text"].as_string(); // their tweet in all it's untruncated glory
+ std::string retweetText = pRetweet["text"].as_string(); // their tweet in all it's untruncated glory
// fix "&amp;" in the tweets :(
for (size_t pos = 0; (pos = retweetText.find("&amp;", pos)) != std::string::npos; pos++)