From 0724964682b0297bc5a81c23fb07e3d3153d4bae Mon Sep 17 00:00:00 2001 From: Sprite Date: Sun, 28 Nov 2021 02:21:46 +0800 Subject: [PATCH 1/2] Add the missing method `caption_entities` to `InputMediaPhoto` --- src/types/input_media.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/types/input_media.rs b/src/types/input_media.rs index eaaab951..1cae6649 100644 --- a/src/types/input_media.rs +++ b/src/types/input_media.rs @@ -68,6 +68,14 @@ impl InputMediaPhoto { self.parse_mode = Some(val); self } + + pub fn caption_entities(mut self, val: C) -> Self + where + C: IntoIterator, + { + self.caption_entities = Some(val.into_iter().collect()); + self + } } /// Represents a video to be sent. From a33588a14b16dcf46da01b8ed3b8416803f88e8c Mon Sep 17 00:00:00 2001 From: Sprite Date: Sun, 28 Nov 2021 02:33:33 +0800 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 709fbe0e..d49827aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,12 +15,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `UntilDate` enum and use it for `{Restricted, Banned}::until_date` ([#116][pr116]) - `Limits::messages_per_min_channel` ([#121][pr121]) - `media_group_id` field to `MediaDocument` and `MediaAudio` ([#139][pr139]) +- `caption_entities` method to `InputMediaPhoto` ([#140][pr140]) [pr109]: https://github.com/teloxide/teloxide-core/pull/109 [pr116]: https://github.com/teloxide/teloxide-core/pull/116 [pr121]: https://github.com/teloxide/teloxide-core/pull/121 [pr135]: https://github.com/teloxide/teloxide-core/pull/135 [pr139]: https://github.com/teloxide/teloxide-core/pull/139 +[pr140]: https://github.com/teloxide/teloxide-core/pull/140 ### Changed