From 01bc5a990b9fcce8035ef565f1b7931bd392df8e Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Sat, 14 Jan 2023 18:39:13 +0400 Subject: [PATCH] ty fixes --- crates/teloxide-core/src/types/chat.rs | 6 ++++++ crates/teloxide-core/src/types/input_media.rs | 3 +++ crates/teloxide-core/src/types/message.rs | 2 ++ crates/teloxide-core/src/types/update.rs | 2 ++ 4 files changed, 13 insertions(+) diff --git a/crates/teloxide-core/src/types/chat.rs b/crates/teloxide-core/src/types/chat.rs index 0b86aa56..38da326b 100644 --- a/crates/teloxide-core/src/types/chat.rs +++ b/crates/teloxide-core/src/types/chat.rs @@ -594,6 +594,8 @@ mod tests { photo: None, pinned_message: None, message_auto_delete_time: None, + has_hidden_members: false, + has_aggressive_anti_spam_enabled: false, }; let actual = from_str(r#"{"id":-1,"type":"channel","username":"channel_name"}"#).unwrap(); assert_eq!(expected, actual); @@ -616,6 +618,8 @@ mod tests { photo: None, pinned_message: None, message_auto_delete_time: None, + has_hidden_members: false, + has_aggressive_anti_spam_enabled: false, }, from_str(r#"{"id":0,"type":"private","username":"username","first_name":"Anon"}"#) .unwrap() @@ -638,6 +642,8 @@ mod tests { photo: None, pinned_message: None, message_auto_delete_time: None, + has_hidden_members: false, + has_aggressive_anti_spam_enabled: false, }; let json = to_string(&chat).unwrap(); diff --git a/crates/teloxide-core/src/types/input_media.rs b/crates/teloxide-core/src/types/input_media.rs index e6a05b4c..9b9effcc 100644 --- a/crates/teloxide-core/src/types/input_media.rs +++ b/crates/teloxide-core/src/types/input_media.rs @@ -573,6 +573,7 @@ mod tests { caption: None, parse_mode: None, caption_entities: None, + has_spoiler: false, }); let actual_json = serde_json::to_string(&photo).unwrap(); @@ -592,6 +593,7 @@ mod tests { duration: None, supports_streaming: None, caption_entities: None, + has_spoiler: false, }); let actual_json = serde_json::to_string(&video).unwrap(); @@ -610,6 +612,7 @@ mod tests { height: None, duration: None, caption_entities: None, + has_spoiler: false, }); let actual_json = serde_json::to_string(&video).unwrap(); diff --git a/crates/teloxide-core/src/types/message.rs b/crates/teloxide-core/src/types/message.rs index bb40f989..a1019a34 100644 --- a/crates/teloxide-core/src/types/message.rs +++ b/crates/teloxide-core/src/types/message.rs @@ -1630,6 +1630,8 @@ mod tests { message_auto_delete_time: None, photo: None, pinned_message: None, + has_hidden_members: false, + has_aggressive_anti_spam_enabled: false, }; assert!(message.from().unwrap().is_anonymous()); diff --git a/crates/teloxide-core/src/types/update.rs b/crates/teloxide-core/src/types/update.rs index df8f7cd6..6ec2040f 100644 --- a/crates/teloxide-core/src/types/update.rs +++ b/crates/teloxide-core/src/types/update.rs @@ -348,6 +348,8 @@ mod test { photo: None, pinned_message: None, message_auto_delete_time: None, + has_hidden_members: false, + has_aggressive_anti_spam_enabled: false, }, kind: MessageKind::Common(MessageCommon { from: Some(User {