&& has a higher precedence than || - fix a logical error when resetting Unpromoted

This commit is contained in:
B. Petersen
2019-12-11 00:22:31 +01:00
committed by holger krekel
parent ff29b84146
commit a8842da50a

View File

@@ -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);