From 4f4d272ced2c09b45d64bf5561dc1300d47d7660 Mon Sep 17 00:00:00 2001 From: trivernis Date: Sat, 21 Aug 2021 11:39:41 +0200 Subject: [PATCH] Fix menu owner check Signed-off-by: trivernis --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/menu/menu.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef54a04..91cccf7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1040,7 +1040,7 @@ dependencies = [ [[package]] name = "serenity-rich-interaction" -version = "0.2.4" +version = "0.2.5" dependencies = [ "futures", "log", diff --git a/Cargo.toml b/Cargo.toml index 9ce89dc..982ebc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "serenity-rich-interaction" -version = "0.2.4" +version = "0.2.5" authors = ["trivernis "] edition = "2018" description = "Menus and self deleting messages for the serenity discord framework" diff --git a/src/menu/menu.rs b/src/menu/menu.rs index b6ad327..39af09c 100644 --- a/src/menu/menu.rs +++ b/src/menu/menu.rs @@ -206,7 +206,7 @@ impl<'a> EventDrivenMessage for Menu<'a> { log::debug!("Deleting user reaction."); reaction.delete(ctx).await?; if let Some(owner) = self.owner { - if owner == reaction.user_id.unwrap() { + if owner != reaction.user_id.unwrap() { log::debug!("Menu has an owner and the reaction is not from the owner of the menu"); return Ok(()); }