From a8842da50ae8f0b834e7ec799b41b21317fea193 Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Wed, 11 Dec 2019 00:22:31 +0100 Subject: [PATCH] && has a higher precedence than || - fix a logical error when resetting Unpromoted --- src/chat.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/chat.rs b/src/chat.rs index a46115723..4b9c29f2c 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -310,9 +310,8 @@ impl Chat { self.id ); } - } else if self.typ == Chattype::Group - || self.typ == Chattype::VerifiedGroup - && self.param.get_int(Param::Unpromoted).unwrap_or_default() == 1 + } else if (self.typ == Chattype::Group || self.typ == Chattype::VerifiedGroup) + && self.param.get_int(Param::Unpromoted).unwrap_or_default() == 1 { msg.param.set_int(Param::AttachGroupImage, 1); self.param.remove(Param::Unpromoted);