From 54f875375a46231a84310a18d7e3546930eb4397 Mon Sep 17 00:00:00 2001
From: tec <tec@ucc.gu.uwa.edu.au>
Date: Sat, 17 Aug 2019 00:32:06 +0800
Subject: [PATCH] resolve invalid votes sooner

---
 src/voting.rs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/voting.rs b/src/voting.rs
index 97aa58e..2960c0f 100644
--- a/src/voting.rs
+++ b/src/voting.rs
@@ -328,6 +328,7 @@ pub fn reaction_add(ctx: Context, add_reaction: channel::Reaction) {
                                         if let Err(why) = add_reaction.delete(&ctx) {
                                             println!("Error deleting react: {:?}", why);
                                         };
+                                        return;
                                     }
                                 }
                             }
@@ -337,6 +338,7 @@ pub fn reaction_add(ctx: Context, add_reaction: channel::Reaction) {
                                 if let Err(why) = add_reaction.delete(&ctx) {
                                     println!("Error deleting react: {:?}", why);
                                 };
+                                return;
                             }
                             if user.id.0 != config::BOT_ID {
                                 update_motion(&ctx, &mut message, &user, "add", add_reaction);
@@ -350,6 +352,7 @@ pub fn reaction_add(ctx: Context, add_reaction: channel::Reaction) {
                                     if let Err(why) = add_reaction.delete(&ctx) {
                                         println!("Error deleting react: {:?}", why);
                                     };
+                                    return;
                                 }
                             }
                         }
-- 
GitLab