From 97cc215f05537d74a7ad8f3439e90ab4649cc945 Mon Sep 17 00:00:00 2001 From: Adrian Malacoda Date: Wed, 10 May 2017 02:16:05 -0500 Subject: [PATCH] more tags --- src/event/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/event/mod.rs b/src/event/mod.rs index f53140c..eb7f6f0 100644 --- a/src/event/mod.rs +++ b/src/event/mod.rs @@ -28,6 +28,7 @@ impl Envelope { match &event { &Event::Message { ref message } => { + tags.insert(String::from("type:message")); tags.insert(format!("user:{:}", message.author.name)); match message.channel { Some(ref channel) => { @@ -37,16 +38,20 @@ impl Envelope { } }, &Event::SelfJoin { ref channel } => { + tags.insert(String::from("type:selfjoin")); tags.insert(format!("channel:{:}", channel.name)); }, &Event::SelfQuit { ref channel } => { + tags.insert(String::from("type:selfquit")); tags.insert(format!("channel:{:}", channel.name)); }, &Event::UserJoin { ref channel, ref user } => { + tags.insert(String::from("type:userjoin")); tags.insert(format!("channel:{:}", channel.name)); tags.insert(format!("user:{:}", user.name)); }, &Event::UserQuit { ref channel, ref user } => { + tags.insert(String::from("type:userquit")); tags.insert(format!("channel:{:}", channel.name)); tags.insert(format!("user:{:}", user.name)); }