From b31cd05328e78f01ec053a8ff60b6db8a92891a1 Mon Sep 17 00:00:00 2001 From: Andy Wortman Date: Wed, 18 Oct 2017 22:28:28 -0700 Subject: lots of tiny tweaks escape more stuff avoid possible breakage if we dont have the fav of a retweet --- src/tw/mod.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/tw') diff --git a/src/tw/mod.rs b/src/tw/mod.rs index b703960..90610f1 100644 --- a/src/tw/mod.rs +++ b/src/tw/mod.rs @@ -257,8 +257,16 @@ impl TwitterCache { self.cache_api_user(json["source"].clone()); self.cache_api_user(json["target"].clone()); }, - Some("retweeted_retweet") => ()/* cache rt */, - Some("favorited_retweet") => ()/* cache rt */, + Some("retweeted_retweet") => { + self.cache_api_tweet(json["target_object"].clone()); + self.cache_api_user(json["source"].clone()); + self.cache_api_user(json["target"].clone()); + }, + Some("favorited_retweet") => { + self.cache_api_tweet(json["target_object"].clone()); + self.cache_api_user(json["source"].clone()); + self.cache_api_user(json["target"].clone()); + }, Some("delete") => { let user_id = json["delete"]["status"]["user_id_str"].as_str().unwrap().to_string(); self.fetch_user(&user_id, &mut queryer); -- cgit v1.1