From 2ab8a00fdd6a8e9386d08c83cb7318ceb3c3c31a Mon Sep 17 00:00:00 2001 From: Andy Wortman Date: Mon, 16 Oct 2017 23:24:52 -0700 Subject: 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 --- src/display/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/display') diff --git a/src/display/mod.rs b/src/display/mod.rs index e66ac77..3a48454 100644 --- a/src/display/mod.rs +++ b/src/display/mod.rs @@ -34,6 +34,12 @@ pub trait Render { impl Render for tw::events::Event { fn render(self, tweeter: &::tw::TwitterCache) { match self { + tw::events::Event::Quoted { user_id, twete_id } => { + println!("---------------------------------"); + let user = tweeter.retrieve_user(&user_id).unwrap(); + println!(" quoted_tweet : {} (@{})", user.name, user.handle); + render_twete(&twete_id, tweeter); + } tw::events::Event::Deleted { user_id, twete_id } => { if let Some(handle) = tweeter.retrieve_user(&user_id).map(|x| &x.handle) { if let Some(_tweet) = tweeter.retrieve_tweet(&twete_id) { -- cgit v1.1