From 290e6229a835caae0a90b2d7afabd089bb549ef1 Mon Sep 17 00:00:00 2001 From: Natsu Kagami Date: Sat, 8 Feb 2020 14:38:16 -0500 Subject: [PATCH] Fix a bug where Pager listens to all reactions from all messages --- youmubot-prelude/src/pagination.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/youmubot-prelude/src/pagination.rs b/youmubot-prelude/src/pagination.rs index be4fee5..e41944d 100644 --- a/youmubot-prelude/src/pagination.rs +++ b/youmubot-prelude/src/pagination.rs @@ -119,6 +119,9 @@ impl PaginationHandler { impl ReactionHandler for PaginationHandler { fn handle_reaction(&mut self, reaction: &Reaction, _is_add: bool) -> CommandResult { + if reaction.message_id != self.message.id { + return Ok(()); + } match &reaction.emoji { ReactionType::Unicode(ref s) => match s.as_str() { ARROW_LEFT if self.page == 0 => return Ok(()),