mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
Update is_present()
to take is_member
into account 💪
This commit is contained in:
parent
30439d6d28
commit
c65996eb75
1 changed files with 4 additions and 1 deletions
|
@ -266,7 +266,10 @@ impl ChatMemberKind {
|
|||
/// [banned]: ChatMemberKind::Banned
|
||||
#[must_use]
|
||||
pub fn is_present(&self) -> bool {
|
||||
!(self.is_left() || self.is_banned())
|
||||
let is_restricted_non_member =
|
||||
matches!(self, Self::Restricted(Restricted { is_member: false, .. }));
|
||||
|
||||
!(self.is_left() || self.is_banned() || is_restricted_non_member)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue