From 7bf3894a319f5e76a5f8f327b713408fb63ee4fd Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sun, 3 Apr 2022 01:22:38 +0400 Subject: [PATCH] Correct documentation From the standpoint of telegram supergroup is a channel... --- src/types/chat_id.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/types/chat_id.rs b/src/types/chat_id.rs index 75583425..71df51b5 100644 --- a/src/types/chat_id.rs +++ b/src/types/chat_id.rs @@ -34,12 +34,16 @@ impl ChatId { matches!(self.to_bare(), BareChatId::User(_)) } - /// Returns `true` if this is an id of a group or supergroup. + /// Returns `true` if this is an id of a group. + /// + /// Note: supergroup is **not** considered a group. pub fn is_group(self) -> bool { matches!(self.to_bare(), BareChatId::Group(_)) } /// Returns `true` if this is an id of a channel. + /// + /// Note: supergroup is considered a channel. pub fn is_channel(self) -> bool { matches!(self.to_bare(), BareChatId::Channel(_)) } @@ -138,6 +142,8 @@ mod tests { 51, 777000, 1000000, + 617136926, + 1666111087, 1 << 20, (1 << 35) | 123456, 1 << 40 - 1,