aboutsummaryrefslogtreecommitdiff
path: root/src/tw
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2017-10-18 22:28:28 -0700
committeriximeow <me@iximeow.net>2017-10-18 22:28:28 -0700
commit662d2a78c39bff7b56b81448a15a179b2af2b000 (patch)
treeec11fd55c8e0323d76d632fb23d996305cf6580b /src/tw
parent3e488ad535a8490d7c039dbaa48993143e6ae467 (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.rs12
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);