Add setters to PublicChatSupergroup
@@ -219,7 +219,7 @@ impl PublicChatGroup {
}
#[serde_with_macros::skip_serializing_none]
-#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
+#[derive(Clone, Default, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
#[non_exhaustive]
pub struct PublicChatSupergroup {
/// A username, for private chats, supergroups and channels if
@@ -251,6 +251,12 @@ pub struct PublicChatSupergroup {
pub slow_mode_delay: Option<i32>,
}
+impl PublicChatSupergroup {
+ pub fn new() -> Self {
+ Self::default()
+ }
+}
+
struct PrivateChatKindVisitor;
impl<'de> serde::de::Visitor<'de> for PrivateChatKindVisitor {
