diff options
author | iximeow <me@iximeow.net> | 2017-10-16 23:24:52 -0700 |
---|---|---|
committer | iximeow <me@iximeow.net> | 2017-10-17 00:11:56 -0700 |
commit | cae27540dba42917bacf1a235d4e4799cd099d02 (patch) | |
tree | 5b3c3a33afa92ed11fe62cf04abcf8553e34aa4b /src/tw/mod.rs | |
parent | 1a4940f21c1783edb3ef91ff5b9f6858b7096348 (diff) |
render quoted tweets
double-post bug if you are the author of the quoting tweet because you see the event AND your tweet in your feed
Diffstat (limited to 'src/tw/mod.rs')
-rw-r--r-- | src/tw/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tw/mod.rs b/src/tw/mod.rs index 9433e45..710bf59 100644 --- a/src/tw/mod.rs +++ b/src/tw/mod.rs @@ -241,6 +241,10 @@ impl TwitterCache { pub fn cache_api_event(&mut self, json: serde_json::Map<String, serde_json::Value>, mut queryer: &mut ::Queryer) { /* don't really care to hold on to who fav, unfav, ... when, just pick targets out. */ match json.get("event").and_then(|x| x.as_str()) { + Some("quoted_tweet") => { + self.cache_api_tweet(json["target_object"].clone()); + self.cache_api_user(json["source"].clone()); + }, Some("favorite") => { self.cache_api_tweet(json["target_object"].clone()); self.cache_api_user(json["source"].clone()); |