diff options
author | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-10-18 22:28:28 -0700 |
---|---|---|
committer | Andy Wortman <ixineeringeverywhere@gmail.com> | 2017-10-18 22:28:28 -0700 |
commit | b31cd05328e78f01ec053a8ff60b6db8a92891a1 (patch) | |
tree | ec11fd55c8e0323d76d632fb23d996305cf6580b /src/tw | |
parent | 2f2a76aab3f23baaf9a47a72b7660a64e2e156dc (diff) |
lots of tiny tweaks
escape more stuff
avoid possible breakage if we dont have the fav of a retweet
Diffstat (limited to 'src/tw')
-rw-r--r-- | src/tw/mod.rs | 12 |
1 files changed, 10 insertions, 2 deletions
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); |