aboutsummaryrefslogtreecommitdiff
path: root/src/tw/events.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2017-10-16 23:24:52 -0700
committeriximeow <me@iximeow.net>2017-10-17 00:11:56 -0700
commitcae27540dba42917bacf1a235d4e4799cd099d02 (patch)
tree5b3c3a33afa92ed11fe62cf04abcf8553e34aa4b /src/tw/events.rs
parent1a4940f21c1783edb3ef91ff5b9f6858b7096348 (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/events.rs')
-rw-r--r--src/tw/events.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tw/events.rs b/src/tw/events.rs
index 0541b0a..c26a840 100644
--- a/src/tw/events.rs
+++ b/src/tw/events.rs
@@ -6,6 +6,7 @@ pub enum Event {
Fav_RT { user_id: String, twete_id: String },
Fav { user_id: String, twete_id: String },
Unfav { user_id: String, twete_id: String },
+ Quoted { user_id: String, twete_id: String },
Followed { user_id: String },
Unfollowed { user_id: String }
}
@@ -35,9 +36,14 @@ impl Event {
user_id: structure["source"]["id_str"].as_str().unwrap().to_owned(),
twete_id: structure["target_object"]["id_str"].as_str().unwrap().to_owned()
}),
+ &"quoted_tweet" => Some(Event::Quoted {
+ user_id: structure["source"]["id_str"].as_str().unwrap().to_owned(),
+ twete_id: structure["target_object"]["id_str"].as_str().unwrap().to_owned()
+ }),
+// &"list_member_added" =>
+// what about removed?
// &"blocked" => Blocked { },
// &"unblocked" => Unblocked { },
-// &"quoted_tweet" => ???,
e => { println!("unrecognized event: {}", e); None }
}
}