Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<img src="https://img.shields.io/crates/v/teloxide_tests.svg">
</a>
<a href="https://github.com/teloxide/teloxide">
<img src="https://img.shields.io/badge/teloxide%20version-0.16.0-green">
<img src="https://img.shields.io/badge/teloxide%20version-0.17.0-green">
</a>
<a href="https://t.me/teloxide_tests">
<img src="https://img.shields.io/badge/support-t.me%2Fteloxide__tests-blueviolet">
Expand Down
8 changes: 4 additions & 4 deletions examples/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/album_bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
teloxide = { version = "0.16.0", features = ["macros"] }
teloxide = { version = "0.17.0", features = ["macros"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
dotenv = "0.15.0"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/calculator_bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
teloxide = { version = "0.16.0", features = ["macros", "redis-storage", "cbor-serializer"] }
teloxide = { version = "0.17.0", features = ["macros", "redis-storage", "cbor-serializer"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
dotenv = "0.15.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/deep_linking_bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
teloxide = { version = "0.16.0", features = ["macros"] }
teloxide = { version = "0.17.0", features = ["macros"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
dotenv = "0.15.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/file_download_bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
teloxide = { version = "0.16.0", features = ["macros"] }
teloxide = { version = "0.17.0", features = ["macros"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
dotenv = "0.15.0"

Expand Down
2 changes: 1 addition & 1 deletion examples/hello_world_bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
teloxide = { version = "0.16.0", features = ["macros"] }
teloxide = { version = "0.17.0", features = ["macros"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
dotenv = "0.15.0"

Expand Down
2 changes: 1 addition & 1 deletion examples/phrase_bot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"

[dependencies]
teloxide = { version = "0.16.0", features = ["macros", "redis-storage", "cbor-serializer"] }
teloxide = { version = "0.17.0", features = ["macros", "redis-storage", "cbor-serializer"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
dotenv = "0.15.0"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion teloxide_tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ log = "0.4"
pretty_env_logger = "0.5"
url = "2.5.1"
reqwest = "0.12.5"
teloxide = { version = "0.16.0", features = ["macros", "sqlite-storage-nativetls"] }
teloxide = { version = "0.17.0", features = ["macros", "sqlite-storage-nativetls"] }
tokio = { version = "1.38", features = ["rt-multi-thread", "macros"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Expand Down
9 changes: 9 additions & 0 deletions teloxide_tests/src/dataset/chat_full_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ macro_rules! ChatFullInfo {
pub emoji_status_expiration_date: Option<DateTime<Utc>>,
pub has_visible_history: bool,
pub max_reaction_count: u8,
pub accepted_gift_types: AcceptedGiftTypes,
$($fpub $field : $type,)*
}
impl $name {
Expand All @@ -35,6 +36,12 @@ macro_rules! ChatFullInfo {
pub const AGGRESSIVE_ANTI_SPAM_ENABLED: bool = false;
pub const HAS_VISIBLE_HISTORY: bool = true;
pub const MAX_REACTION_COUNT: u8 = 100;
pub const ACCEPTED_GIFT_TYPES: AcceptedGiftTypes = AcceptedGiftTypes {
unlimited_gifts: false,
limited_gifts: false,
unique_gifts: false,
premium_subscription: false,
};

pub(crate) fn new_chat_full_info($($field:$type,)*) -> Self{
Self { // To not repeat this over and over again
Expand All @@ -52,6 +59,7 @@ macro_rules! ChatFullInfo {
emoji_status_expiration_date: None,
has_visible_history: Self::HAS_VISIBLE_HISTORY,
max_reaction_count: Self::MAX_REACTION_COUNT,
accepted_gift_types: Self::ACCEPTED_GIFT_TYPES,
$($field,)*
}
}
Expand All @@ -73,6 +81,7 @@ macro_rules! ChatFullInfo {
has_visible_history: self.has_visible_history,
max_reaction_count: self.max_reaction_count,
kind: chat_full_info_kind,
accepted_gift_types: self.accepted_gift_types,
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions teloxide_tests/src/dataset/message_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ macro_rules! MessageCommon { // Rust was supposed to be used without inheritanc
#[derive($($derive),*)]
$pub struct $name {
pub author_signature: Option<String>,
pub paid_star_count: Option<u32>,
pub effect_id: Option<EffectId>,
pub forward_origin: Option<MessageOrigin>,
pub reply_to_message: Option<Box<Message>>,
Expand Down Expand Up @@ -52,6 +53,7 @@ macro_rules! MessageCommon { // Rust was supposed to be used without inheritanc
None,
None,
None,
None,
$name::IS_AUTOMATIC_FORWARD,
$name::HAS_PROTECTED_CONTENT,
$name::IS_FROM_OFFLINE,
Expand All @@ -65,6 +67,7 @@ macro_rules! MessageCommon { // Rust was supposed to be used without inheritanc
pub(crate) fn build_message_common(self, media_kind: MediaKind) -> Message {
self.clone().build_message(MessageKind::Common(MessageCommon {
author_signature: self.author_signature,
paid_star_count: self.paid_star_count,
effect_id: self.effect_id,
forward_origin: self.forward_origin,
reply_to_message: self.reply_to_message,
Expand Down
6 changes: 6 additions & 0 deletions teloxide_tests/src/dataset/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ pub struct MockVideo {
pub height: u32,
pub duration: Seconds,
pub thumbnail: Option<PhotoSize>,
pub cover: Option<Vec<PhotoSize>>,
pub start_timestamp: Option<Seconds>,
pub file_name: Option<String>,
pub mime_type: Option<Mime>,
// FileMeta
Expand Down Expand Up @@ -417,6 +419,8 @@ impl MockVideo {
height: Self::HEIGHT,
duration: Self::DURATION,
thumbnail: None,
cover: None,
start_timestamp: None,
file_name: None,
mime_type: None,
file_id: Self::FILE_ID.into(),
Expand All @@ -440,6 +444,8 @@ impl MockVideo {
height: self.height,
duration: self.duration,
thumbnail: self.thumbnail,
cover: self.cover,
start_timestamp: self.start_timestamp,
file_name: self.file_name,
mime_type: self.mime_type,
file: FileMeta {
Expand Down
Loading