From b9db2d544d06c70dc4b64a00630e3749d7922ec7 Mon Sep 17 00:00:00 2001 From: lbia Date: Thu, 8 Oct 2020 22:11:39 +0200 Subject: [PATCH] Reformat CHANGELOG.md --- CHANGELOG.md | 1114 +++++++++++++++++++++++++------------------------- 1 file changed, 557 insertions(+), 557 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ead3c0088d..6da212ca8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,67 @@ * All `send` extensions for `TelegramBot` got their `reply` variations (issue [#144](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/144)) * A lot of `send` extensions for `TelegramBot` got their variation with `Chat` instead of `ChatIdentifier` +## 0.28.4 + +* `Common`: + * Version updates: + * `Ktor`: `1.4.0` -> `1.4.1` +* `TelegramBotAPI-core` + * Interface `GroupEventMessage` has been added ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) + * Old `GroupEventMessage` was renamed to `CommonGroupEventMessage` ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) + * Interface `SupergroupEventMessage` has been added ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) + * Old `SupergroupEventMessage` was renamed to `CommonSupergroupEventMessage` ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) + * Any `GroupEventMessage` now have `from` field ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) +* `TelegramBotAPI-extensions-utils` + * Extensions `Flow#onlyGroupEvents` and `Flow#onlySupergroupEvents` now returns + `CommonGroupEventMessage` and `CommonSupergroupEventMessage` + +## 0.28.3 + +* Common: + * Version updates: + * `Klock`: `0.12.0` -> `0.12.1` + * `Kotlin serialization`: `1.0.0-RC` -> `1.0.0-RC2` (dependency `kotlinx-serialization-core` was replaced with + `kotlinx-serialization-json` due to [kotlinx.serialization library update](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md#100-rc2--2020-09-21)) +* `TelegramBotAPI-core`: + * All `InlineQueryResult` has changed their type of id for more obvious relation between `InlineQueryResult#id` and + `ChosenInlineResult#resultId`: `String` -> `InlineQueryIdentifier` +* `TelegramBotAPI-extensions-utils`: + * Several extensions for updates flows based on `InlineQueryUpdate` has been added: + * `Flow#onlyBaseInlineQueriesWithUpdates` + * `Flow#onlyBaseInlineQueries` + * `Flow#onlyLocationInlineQueriesWithUpdates` + * `Flow#onlyLocationInlineQueries` + * Several extensions for updates flows based on `ChosenInlineResultUpdate` has been added: + * `Flow.onlyBaseChosenInlineResultsWithUpdates` + * `Flow.onlyBaseChosenInlineResults` + * `Flow.onlyLocationChosenInlineResultsWithUpdates` + * `Flow.onlyLocationChosenInlineResults` + +## 0.28.2 + +* `TelegramBotAPI-extensions-utils`: + * Several commands shortcuts for `Flow>` has been added: + * `filterExactCommands` + * `filterCommandsInsideTextMessages` + * `filterCommandsWithArgs` + * Extension `Flow.filterCommandsWithArgs` has changed its signature: now it will also have + original message paired with list of text sources + * Shortcut method `commonMessages` for `onlyCommonMessages` + * Shortcuts `onlySentViaBot` and `withoutSentViaBot` now are extensions for any `Flow` with types which implementing + `ContentMessage` + +## 0.28.1 + +* Common: + * Versions updates: + * `Kotlin`: `1.4.0` -> `1.4.10` + * `UUID`: `0.2.1` -> `0.2.2` +* `TelegramBotAPI-core`: + * `ExceptionHandler` has changed its incoming type: `Exception` -> `Throwable` + * `handleSafely` has changed its signature + * `executeUnsafe` has changed its signature + ## 0.28.0 * **THIS VERSION CONTAINS BREAKING CHANGES** @@ -68,66 +129,235 @@ * `HttpClient#loadFile` * `PathedFile#download` -### 0.28.4 +## 0.27.11 + +* `TelegramBotAPI`: + * Extension `String#filenameFromUrl` was created + * Extension `PathedFile#filename` was created +* `TelegramBotAPI-extensions-utils`: + * `Flow>.flatMap` extension was added + * Extensions for `FlowUpdatesFilter` were added: + * `FlowsUpdatesFilter#allSentMessagesFlow` (combination of `messageFlow` and `channelPostFlow`) + * `FlowsUpdatesFilter#allSentMediaGroupsFlow` (combination of `messageMediaGroupFlow` and `channelPostMediaGroupFlow`) + * `FlowsUpdatesFilter#sentMessages` + * `FlowsUpdatesFilter#sentMessagesWithMediaGroups` + * `FlowsUpdatesFilter#photoMessagesWithMediaGroups` + * `FlowsUpdatesFilter#imageMessagesWithMediaGroups` + * `FlowsUpdatesFilter#videoMessagesWithMediaGroups` + * `FlowsUpdatesFilter#mediaGroupMessages` + * `FlowsUpdatesFilter#mediaGroupPhotosMessages` + * `FlowsUpdatesFilter#mediaGroupVideosMessages` + * A lot of extensions like `Flow#textMessages` were added: + * `Flow#animationMessages` + * `Flow#audioMessages` + * `Flow#contactMessages` + * `Flow#diceMessages` + * `Flow#documentMessages` + * `Flow#gameMessages` + * `Flow#invoiceMessages` + * `Flow#locationMessages` + * `Flow#photoMessages` + * `Flow#imageMessages` + * `Flow#pollMessages` + * `Flow#stickerMessages` + * `Flow#textMessages` + * `Flow#venueMessages` + * `Flow#videoMessages` + * `Flow#videoNoteMessages` + * `Flow#voiceMessages` + * `Flow#mediaGroupMessages` + * `Flow#mediaGroupPhotosMessages` + * `Flow#mediaGroupVideosMessages` + +## 0.27.10 + +* `TelegramBotAPI-extensions-api`: + * Function `telegramBot(TelegramAPIUrlsKeeper)` was added +* `TelegramBotAPI-extensions-utils`: + * Extension `Route#includeWebhookHandlingInRouteWithFlows` was added + * A lot of extensions like `FlowsUpdatesFilter#textMessages` were added: + * `FlowsUpdatesFilter#animationMessages` + * `FlowsUpdatesFilter#audioMessages` + * `FlowsUpdatesFilter#contactMessages` + * `FlowsUpdatesFilter#diceMessages` + * `FlowsUpdatesFilter#documentMessages` + * `FlowsUpdatesFilter#gameMessages` + * `FlowsUpdatesFilter#invoiceMessages` + * `FlowsUpdatesFilter#locationMessages` + * `FlowsUpdatesFilter#photoMessages` + * `FlowsUpdatesFilter#imageMessages` + * `FlowsUpdatesFilter#pollMessages` + * `FlowsUpdatesFilter#stickerMessages` + * `FlowsUpdatesFilter#textMessages` + * `FlowsUpdatesFilter#venueMessages` + * `FlowsUpdatesFilter#videoMessages` + * `FlowsUpdatesFilter#videoNoteMessages` + * `FlowsUpdatesFilter#voiceMessages` + +## 0.27.9 + +* `Common` + * Versions updates: + * `Gradle Wrapper`: `6.5-all` -> `6.5.1-bin` + * `Coroutines`: `1.3.7` -> `1.3.8` + * `Klock`: `1.11.3` -> `1.11.14` + * `UUID`: `0.1.0` -> `0.1.1` + +## 0.27.8 + +* `TelegramBotAPI`: + * `UnknownUpdateType` was renamed to `UnknownUpdate` + * Refactoring and optimization of `FlowsUpdatesFilter` + * `Venue` type was replaced to a new package: `com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue` + * `Venue` type now implements `Locationed` and delegate realisation to its `location` field + * `FoursquareId` and `FoursquareType` typealiases were added +* `TelegramBotAPI-extensions-utils`: + * Several new functions `makeLinkToMessage` was added + * `Foursquare` data class was added + * Extension `Venue#foursquare` was added + * Factory function `Venue` with `Foursquare` parameter was added + +## 0.27.7 + +* `TelegramBotAPI`: + * Operator function `unaryPlus` was added to `RowBuilder`. Now it is possible to write `row { +button }` + * Function `flatMatrix` was added for single-row columns + * Operator extension `RowBuilder#plus` was added to be able to write things like `row { this + button }` +* `TelegramBotAPI-extensions-api`: + * Extensions `RequestsExecutor#sendVenue` with `Location` args were added +* `TelegramBotAPI-extensions-utils`: + * Function `InlineKeyboardMarkup` for flat keyboards was added + * Function `ReplyKeyboardMarkup` for flat keyboards was added + +## 0.27.6 * `Common`: - * Version updates: - * `Ktor`: `1.4.0` -> `1.4.1` -* `TelegramBotAPI-core` - * Interface `GroupEventMessage` has been added ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) - * Old `GroupEventMessage` was renamed to `CommonGroupEventMessage` ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) - * Interface `SupergroupEventMessage` has been added ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) - * Old `SupergroupEventMessage` was renamed to `CommonSupergroupEventMessage` ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) - * Any `GroupEventMessage` now have `from` field ([#140](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/140)) -* `TelegramBotAPI-extensions-utils` - * Extensions `Flow#onlyGroupEvents` and `Flow#onlySupergroupEvents` now returns - `CommonGroupEventMessage` and `CommonSupergroupEventMessage` - -### 0.28.3 - -* Common: - * Version updates: - * `Klock`: `0.12.0` -> `0.12.1` - * `Kotlin serialization`: `1.0.0-RC` -> `1.0.0-RC2` (dependency `kotlinx-serialization-core` was replaced with - `kotlinx-serialization-json` due to [kotlinx.serialization library update](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md#100-rc2--2020-09-21)) -* `TelegramBotAPI-core`: - * All `InlineQueryResult` has changed their type of id for more obvious relation between `InlineQueryResult#id` and - `ChosenInlineResult#resultId`: `String` -> `InlineQueryIdentifier` + * Versions: + * `Kotlin Coroutines`: `1.3.6` -> `1.3.7` +* `TelegramBotAPI`: + * Interface `PossiblySentViaBot` has been added + * Additional interface `PossiblySentViaBotCommonMessage` was added for more explicit typing declaration for + compiler + * Currently, only `ChannelMessage` and `CommonMessageImpl` are implementing the interface + `PossiblySentViaBotCommonMessage`. It could be changed in future + * Factory `buildMimeType` was added + * `BuiltinMimeTypes` was added + * Abstraction `ThumbedWithMimeTypeInlineQueryResult` with `thumbMimeType` field was added + * `InlineQueryResultGif` and `InlineQueryResultMpeg4Gif` now extend `ThumbedWithMimeTypeInlineQueryResult` + instead of `ThumbedInlineQueryResult` * `TelegramBotAPI-extensions-utils`: - * Several extensions for updates flows based on `InlineQueryUpdate` has been added: - * `Flow#onlyBaseInlineQueriesWithUpdates` - * `Flow#onlyBaseInlineQueries` - * `Flow#onlyLocationInlineQueriesWithUpdates` - * `Flow#onlyLocationInlineQueries` - * Several extensions for updates flows based on `ChosenInlineResultUpdate` has been added: - * `Flow.onlyBaseChosenInlineResultsWithUpdates` - * `Flow.onlyBaseChosenInlineResults` - * `Flow.onlyLocationChosenInlineResultsWithUpdates` - * `Flow.onlyLocationChosenInlineResults` + * New extensions `onlyCommonMessages`, `onlySentViaBot` and `withoutSentViaBot` was added -### 0.28.2 +## 0.27.5 + +* `Common`: + * Versions: + * `Klock`: `1.11.1` -> `1.11.3` +* `TelegramotAPI`: + * Fix: for sending requests caption and text lengths limits were updated + * New variant of `row` was added + * `makeLinkToMessage` extensions has been deprecated (replaced into `TelegramBotAPI-extensions-utils`) + * Next things was deprecated and replaced into `TelegramBotAPI-extensions-utils`: + * All `String` formatting public extensions and functions + * All extensions like `CaptionedInput#toHtmlCaptions` + * All helper extensions for `List` + * All `RequestsExecutor#executeAsync` and `RequestsExecutor#executeUnsafe` + * `BotCommand` now more strictly check commands which passed to it + * Regex `BotCommandNameRegex` was added +* `TelegramBotAPI-extensions-api`: + * A lot of `RequesstExecutor#getChat` extensions was added for more explicit types showing + * New `RequesstExecutor#setMyCommands` extension was added + * New field `BotBuilder#ktorClientEngineFactory` introduced + * Field `BotBuilder#ktorClientEngine` now is deprecated +* `TelegramBotAPI-extensions-utils`: + * `safely` function was introduced. It is in `PreviewFeature` state currently + * `makeLinkToMessage` extensions has been added + * `makeLinkToAddStickerSet` function and its variations were added + * Next tools was added from `TelegramBotAPI`: + * All `String` formatting extensions and functions + * All extensions like `CaptionedInput#toHtmlCaptions` + * All helper extensions for `List` + * Several new extensions for `SentMediaGroupUpdate` were added: + * `SentMediaGroupUpdate#forwardInfo` + * `SentMediaGroupUpdate#replyTo` + * `SentMediaGroupUpdate#chat` + * `SentMediaGroupUpdate#mediaGroupId` + * Several `List.createResend` extensions were added + * `RequestsExecutor#executeAsync` and `RequestsExecutor#executeUnsafe` + +## 0.27.4 * `TelegramBotAPI-extensions-utils`: - * Several commands shortcuts for `Flow>` has been added: - * `filterExactCommands` - * `filterCommandsInsideTextMessages` - * `filterCommandsWithArgs` - * Extension `Flow.filterCommandsWithArgs` has changed its signature: now it will also have - original message paired with list of text sources - * Shortcut method `commonMessages` for `onlyCommonMessages` - * Shortcuts `onlySentViaBot` and `withoutSentViaBot` now are extensions for any `Flow` with types which implementing - `ContentMessage` + * Several extensions for updates was added: + * `onlyBaseMessageUpdates` + * `onlySentMessageUpdates` + * `onlyEditMessageUpdates` + * `onlyMediaGroupsUpdates` + * `onlySentMediaGroupUpdates` + * `onlyEditMediaGroupUpdates` + * Renames in chat filters extensions: + * `filterBaseMessageUpdates` -> `filterBaseMessageUpdatesByChatId` and `filterBaseMessageUpdatesByChat` + * `filterSentMediaGroupUpdates` -> `filterSentMediaGroupUpdatesByChatId` and `filterSentMediaGroupUpdatesByChat` -### 0.28.1 +## 0.27.3 -* Common: - * Versions updates: - * `Kotlin`: `1.4.0` -> `1.4.10` - * `UUID`: `0.2.1` -> `0.2.2` -* `TelegramBotAPI-core`: - * `ExceptionHandler` has changed its incoming type: `Exception` -> `Throwable` - * `handleSafely` has changed its signature - * `executeUnsafe` has changed its signature +* `TelegramBotAPI`: + * `UpdateDeserializationStrategy` is publicly available now + * All `setWebhook` extensions was marked as deprecated, renamed and replaced into `TelegramBotAPI-extensions-utils` + * Typealias `ExceptionHandler` was added - it will be used for `handleSafely` + * `SetWebhook` factories signatures was changed (backward compatibility was not broken) + * `executeUnsafe` now working differently + * Now it is possible to pass exceptions handler into `executeUnsafe` + * `BasketballDiceAnimationType` was added + * `UnknownDiceAnimationType` now is deprecated due to renaming - currently it is typealias for `CustomDiceAnimationType` + * `CustomDiceAnimationType` now is `data` class instead of common class + * `FlowsUpdatesFilter` will use size 64 by default for internal broadcast channels +* `TelegramBotAPI-extensions-api`: + * Long Polling extensions now are deprecated in this project. It was replaced into `TelegramBotAPI-extensions-utils` + * Several `telegramBot` functions was renamed into `telegramBotWithCustomClientConfig` + * Add one more `setWebhookInfo` realisation +* `TelegramBotAPI-extensions-utils`: + * Extension `toTelegramUpdate` was added + * Long Polling extensions were added + * Updates utils were added + * New extensions `startListenWebhooks`, `setWebhookInfoAndStartListenWebhooks` and `includeWebhookHandlingInRoute` was added + * New extension `CoroutineScope#updateHandlerWithMediaGroupsAdaptation` was added + * New extension `flowsUpdatesFilter` was added +* `TelegramBotAPI-all`: + * Project was created + +## 0.27.2 + +* `Common`: + * Versions: + * Coroutines: `1.3.5` -> `1.3.6` + * Klock: `1.10.5` -> `1.11.1` +* `TelegramBotAPI`: + * Expected class `MimeType` was added + * Field `MimeTyped#mimeType` now typed by `MimeType` instead of `String` + * `MediaGroupMemberInputMedia` children now can be deserialized (but only those ones who are declared inside library) +* `TelegramBotAPI-extensions-utils`: + * Chat events splitters added: + * Extension `Flow#onlyChannelEvents` was added + * Extension `Flow#onlyGroupEvents` was added + * Extension `Flow#onlySupergroupEvents` was added + +## 0.27.1 + +* `TelegramBotAPI`: + * Interface `Explained` and subsinterfaces `ExplainedInput` and `ExplainedOutput` was added + * Class `QuizPoll` now implement `ExplainedInput` + * In `QuizPoll#caption` and `QuizPoll#captionEntities` are deprecated now + * Class `SendQuizPoll` now implement `ExplainedOutput` + * In `SendQuizPoll#caption` is deprecated now + * `explanationLimit` range was added as future replacement of `quizPollExplanationLimit` + * `quizPollExplanationLimit` now is deprecated + * Extensions `toMarkdownExplanations`, `toMarkdownV2Explanations` and `toHtmlExplanations` was added + * Typealias `FullTextSourcesList` was added + * All extensions `fullEntitiesList` now return `FullTextSourcesList` + * All extensions of `List` now are extensions for `FullTextSourcesList` +* `TelegramBotAPI-extensions-api`: + * `sendQuizPoll` now is using `explanation` parameter instead of `caption` ## 0.27.0 @@ -178,235 +408,74 @@ * `closePollExactAfter` * `closePollAfter` -### 0.27.11 +## 0.26.4 * `TelegramBotAPI`: - * Extension `String#filenameFromUrl` was created - * Extension `PathedFile#filename` was created -* `TelegramBotAPI-extensions-utils`: - * `Flow>.flatMap` extension was added - * Extensions for `FlowUpdatesFilter` were added: - * `FlowsUpdatesFilter#allSentMessagesFlow` (combination of `messageFlow` and `channelPostFlow`) - * `FlowsUpdatesFilter#allSentMediaGroupsFlow` (combination of `messageMediaGroupFlow` and `channelPostMediaGroupFlow`) - * `FlowsUpdatesFilter#sentMessages` - * `FlowsUpdatesFilter#sentMessagesWithMediaGroups` - * `FlowsUpdatesFilter#photoMessagesWithMediaGroups` - * `FlowsUpdatesFilter#imageMessagesWithMediaGroups` - * `FlowsUpdatesFilter#videoMessagesWithMediaGroups` - * `FlowsUpdatesFilter#mediaGroupMessages` - * `FlowsUpdatesFilter#mediaGroupPhotosMessages` - * `FlowsUpdatesFilter#mediaGroupVideosMessages` - * A lot of extensions like `Flow#textMessages` were added: - * `Flow#animationMessages` - * `Flow#audioMessages` - * `Flow#contactMessages` - * `Flow#diceMessages` - * `Flow#documentMessages` - * `Flow#gameMessages` - * `Flow#invoiceMessages` - * `Flow#locationMessages` - * `Flow#photoMessages` - * `Flow#imageMessages` - * `Flow#pollMessages` - * `Flow#stickerMessages` - * `Flow#textMessages` - * `Flow#venueMessages` - * `Flow#videoMessages` - * `Flow#videoNoteMessages` - * `Flow#voiceMessages` - * `Flow#mediaGroupMessages` - * `Flow#mediaGroupPhotosMessages` - * `Flow#mediaGroupVideosMessages` + * Now any getting of updates will return `UnknownUpdateType` when inside of deserialization will be + `SerializationException` or `NotImplemented` error + * `CallbackGame` currently is an object + * It is possible to use `CallbackGame` for now + * `CallbackGameInlineKeyboardButton` now will not accept `callbackGame` as income object + * Now it is possible to pass exception handler in webhook -### 0.27.10 +## 0.26.3 +* `TelegramBotAPI`: + * `CallbackGameInlineKeyboardButton` was added + ([Issue-79](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/79), + [PR-80](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/80)) + * `UnknownInlineKeyboardButton` was added. It is unavailable for creating, but you can receive it, for example, in + `InlineQueryResult` + * `Update` now will be created even if was `SerializationException` inside of creating the update instance - in this + case will be created `UnknownUpdateType` + * `UnknownUpdateType$rawJson` value now is included (`JsonElement`) + * **EXPERIMENTALLY** `BaseEditMessageUpdate#data` now is `CommonMessage<*>` + * Suspend inline function `handleSafely` was added + * `KtorRequestsExecutor` now use `handleSafely` instead of `try` with `supervisorScope` + * `UpdatesPolling` now use `handleSafely` instead of `try` with `supervisorScope` + +## 0.26.2 + +* `TelegramBotAPI`: + * Now `EditMediaGroupUpdate` also extends `BaseEditMessageUpdate` + * **EXPERIMENTALLY** Now all `TextSource` realisations will contain `source` field as a property inside of them * `TelegramBotAPI-extensions-api`: - * Function `telegramBot(TelegramAPIUrlsKeeper)` was added + * `startGettingFlowsUpdates` extension which do not require filter (but return a new one) was added * `TelegramBotAPI-extensions-utils`: - * Extension `Route#includeWebhookHandlingInRouteWithFlows` was added - * A lot of extensions like `FlowsUpdatesFilter#textMessages` were added: - * `FlowsUpdatesFilter#animationMessages` - * `FlowsUpdatesFilter#audioMessages` - * `FlowsUpdatesFilter#contactMessages` - * `FlowsUpdatesFilter#diceMessages` - * `FlowsUpdatesFilter#documentMessages` - * `FlowsUpdatesFilter#gameMessages` - * `FlowsUpdatesFilter#invoiceMessages` - * `FlowsUpdatesFilter#locationMessages` - * `FlowsUpdatesFilter#photoMessages` - * `FlowsUpdatesFilter#imageMessages` - * `FlowsUpdatesFilter#pollMessages` - * `FlowsUpdatesFilter#stickerMessages` - * `FlowsUpdatesFilter#textMessages` - * `FlowsUpdatesFilter#venueMessages` - * `FlowsUpdatesFilter#videoMessages` - * `FlowsUpdatesFilter#videoNoteMessages` - * `FlowsUpdatesFilter#voiceMessages` + * Subproject was added + * `filterBaseMessageUpdates`, `filterSentMediaGroupUpdates` and `filterEditMediaGroupUpdates` extensions was added + * `filterCommandsWithArgs`, `filterExactCommands` and `filterCommandsInsideTextMessages` extensions was added + * `asContentMessagesFlow`, `asChatEventsFlow` and `asUnknownMessagesFlow` extensions was added + * `withContentType` extension was added + * `onlyAnimationContentMessages` extension was added + * `onlyAudioContentMessages` extension was added + * `onlyContactContentMessages` extension was added + * `onlyDiceContentMessages` extension was added + * `onlyDocumentContentMessages` extension was added + * `onlyGameContentMessages` extension was added + * `onlyInvoiceContentMessages` extension was added + * `onlyLocationContentMessages` extension was added + * `onlyPhotoContentMessages` extension was added + * `onlyPollContentMessages` extension was added + * `onlyStickerContentMessages` extension was added + * `onlyTextContentMessages` extension was added + * `onlyVenueContentMessages` extension was added + * `onlyVideoContentMessages` extension was added + * `onlyVideoNoteContentMessages` extension was added + * `onlyVoiceContentMessages` extension was added -### 0.27.9 - -* `Common` - * Versions updates: - * `Gradle Wrapper`: `6.5-all` -> `6.5.1-bin` - * `Coroutines`: `1.3.7` -> `1.3.8` - * `Klock`: `1.11.3` -> `1.11.14` - * `UUID`: `0.1.0` -> `0.1.1` - -### 0.27.8 +## 0.26.1 * `TelegramBotAPI`: - * `UnknownUpdateType` was renamed to `UnknownUpdate` - * Refactoring and optimization of `FlowsUpdatesFilter` - * `Venue` type was replaced to a new package: `com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue` - * `Venue` type now implements `Locationed` and delegate realisation to its `location` field - * `FoursquareId` and `FoursquareType` typealiases were added -* `TelegramBotAPI-extensions-utils`: - * Several new functions `makeLinkToMessage` was added - * `Foursquare` data class was added - * Extension `Venue#foursquare` was added - * Factory function `Venue` with `Foursquare` parameter was added - -### 0.27.7 - -* `TelegramBotAPI`: - * Operator function `unaryPlus` was added to `RowBuilder`. Now it is possible to write `row { +button }` - * Function `flatMatrix` was added for single-row columns - * Operator extension `RowBuilder#plus` was added to be able to write things like `row { this + button }` -* `TelegramBotAPI-extensions-api`: - * Extensions `RequestsExecutor#sendVenue` with `Location` args were added -* `TelegramBotAPI-extensions-utils`: - * Function `InlineKeyboardMarkup` for flat keyboards was added - * Function `ReplyKeyboardMarkup` for flat keyboards was added - -### 0.27.6 - -* `Common`: - * Versions: - * `Kotlin Coroutines`: `1.3.6` -> `1.3.7` -* `TelegramBotAPI`: - * Interface `PossiblySentViaBot` has been added - * Additional interface `PossiblySentViaBotCommonMessage` was added for more explicit typing declaration for - compiler - * Currently, only `ChannelMessage` and `CommonMessageImpl` are implementing the interface - `PossiblySentViaBotCommonMessage`. It could be changed in future - * Factory `buildMimeType` was added - * `BuiltinMimeTypes` was added - * Abstraction `ThumbedWithMimeTypeInlineQueryResult` with `thumbMimeType` field was added - * `InlineQueryResultGif` and `InlineQueryResultMpeg4Gif` now extend `ThumbedWithMimeTypeInlineQueryResult` - instead of `ThumbedInlineQueryResult` -* `TelegramBotAPI-extensions-utils`: - * New extensions `onlyCommonMessages`, `onlySentViaBot` and `withoutSentViaBot` was added - -### 0.27.5 - -* `Common`: - * Versions: - * `Klock`: `1.11.1` -> `1.11.3` -* `TelegramotAPI`: - * Fix: for sending requests caption and text lengths limits were updated - * New variant of `row` was added - * `makeLinkToMessage` extensions has been deprecated (replaced into `TelegramBotAPI-extensions-utils`) - * Next things was deprecated and replaced into `TelegramBotAPI-extensions-utils`: - * All `String` formatting public extensions and functions - * All extensions like `CaptionedInput#toHtmlCaptions` - * All helper extensions for `List` - * All `RequestsExecutor#executeAsync` and `RequestsExecutor#executeUnsafe` - * `BotCommand` now more strictly check commands which passed to it - * Regex `BotCommandNameRegex` was added -* `TelegramBotAPI-extensions-api`: - * A lot of `RequesstExecutor#getChat` extensions was added for more explicit types showing - * New `RequesstExecutor#setMyCommands` extension was added - * New field `BotBuilder#ktorClientEngineFactory` introduced - * Field `BotBuilder#ktorClientEngine` now is deprecated -* `TelegramBotAPI-extensions-utils`: - * `safely` function was introduced. It is in `PreviewFeature` state currently - * `makeLinkToMessage` extensions has been added - * `makeLinkToAddStickerSet` function and its variations were added - * Next tools was added from `TelegramBotAPI`: - * All `String` formatting extensions and functions - * All extensions like `CaptionedInput#toHtmlCaptions` - * All helper extensions for `List` - * Several new extensions for `SentMediaGroupUpdate` were added: - * `SentMediaGroupUpdate#forwardInfo` - * `SentMediaGroupUpdate#replyTo` - * `SentMediaGroupUpdate#chat` - * `SentMediaGroupUpdate#mediaGroupId` - * Several `List.createResend` extensions were added - * `RequestsExecutor#executeAsync` and `RequestsExecutor#executeUnsafe` - -### 0.27.4 - -* `TelegramBotAPI-extensions-utils`: - * Several extensions for updates was added: - * `onlyBaseMessageUpdates` - * `onlySentMessageUpdates` - * `onlyEditMessageUpdates` - * `onlyMediaGroupsUpdates` - * `onlySentMediaGroupUpdates` - * `onlyEditMediaGroupUpdates` - * Renames in chat filters extensions: - * `filterBaseMessageUpdates` -> `filterBaseMessageUpdatesByChatId` and `filterBaseMessageUpdatesByChat` - * `filterSentMediaGroupUpdates` -> `filterSentMediaGroupUpdatesByChatId` and `filterSentMediaGroupUpdatesByChat` - -### 0.27.3 - -* `TelegramBotAPI`: - * `UpdateDeserializationStrategy` is publicly available now - * All `setWebhook` extensions was marked as deprecated, renamed and replaced into `TelegramBotAPI-extensions-utils` - * Typealias `ExceptionHandler` was added - it will be used for `handleSafely` - * `SetWebhook` factories signatures was changed (backward compatibility was not broken) - * `executeUnsafe` now working differently - * Now it is possible to pass exceptions handler into `executeUnsafe` - * `BasketballDiceAnimationType` was added - * `UnknownDiceAnimationType` now is deprecated due to renaming - currently it is typealias for `CustomDiceAnimationType` - * `CustomDiceAnimationType` now is `data` class instead of common class - * `FlowsUpdatesFilter` will use size 64 by default for internal broadcast channels -* `TelegramBotAPI-extensions-api`: - * Long Polling extensions now are deprecated in this project. It was replaced into `TelegramBotAPI-extensions-utils` - * Several `telegramBot` functions was renamed into `telegramBotWithCustomClientConfig` - * Add one more `setWebhookInfo` realisation -* `TelegramBotAPI-extensions-utils`: - * Extension `toTelegramUpdate` was added - * Long Polling extensions were added - * Updates utils were added - * New extensions `startListenWebhooks`, `setWebhookInfoAndStartListenWebhooks` and `includeWebhookHandlingInRoute` was added - * New extension `CoroutineScope#updateHandlerWithMediaGroupsAdaptation` was added - * New extension `flowsUpdatesFilter` was added -* `TelegramBotAPI-all`: - * Project was created - -### 0.27.2 - -* `Common`: - * Versions: - * Coroutines: `1.3.5` -> `1.3.6` - * Klock: `1.10.5` -> `1.11.1` -* `TelegramBotAPI`: - * Expected class `MimeType` was added - * Field `MimeTyped#mimeType` now typed by `MimeType` instead of `String` - * `MediaGroupMemberInputMedia` children now can be deserialized (but only those ones who are declared inside library) -* `TelegramBotAPI-extensions-utils`: - * Chat events splitters added: - * Extension `Flow#onlyChannelEvents` was added - * Extension `Flow#onlyGroupEvents` was added - * Extension `Flow#onlySupergroupEvents` was added - -### 0.27.1 - -* `TelegramBotAPI`: - * Interface `Explained` and subsinterfaces `ExplainedInput` and `ExplainedOutput` was added - * Class `QuizPoll` now implement `ExplainedInput` - * In `QuizPoll#caption` and `QuizPoll#captionEntities` are deprecated now - * Class `SendQuizPoll` now implement `ExplainedOutput` - * In `SendQuizPoll#caption` is deprecated now - * `explanationLimit` range was added as future replacement of `quizPollExplanationLimit` - * `quizPollExplanationLimit` now is deprecated - * Extensions `toMarkdownExplanations`, `toMarkdownV2Explanations` and `toHtmlExplanations` was added - * Typealias `FullTextSourcesList` was added - * All extensions `fullEntitiesList` now return `FullTextSourcesList` - * All extensions of `List` now are extensions for `FullTextSourcesList` -* `TelegramBotAPI-extensions-api`: - * `sendQuizPoll` now is using `explanation` parameter instead of `caption` + * `BotCommand` now will check and throw error in case when command or description lengths is/are incorrect + * `StorageFile` now is common for all platforms + * JavaScript realization was removed due to its redundancy + * JVM realization was replaced with `fun` factory + * `StorageFile` now able to accept any factory of `Input` + * `StorageFileInfo` was added to avoid strange collisions with throws in `StorageFile` + * Fixes issue with `hashTag` for markdown + * `InvalidPhotoDimensionsException` was added for cases when `PHOTO_INVALID_DIMENSION` answer received + * Other fixes ## 0.26.0 @@ -446,74 +515,10 @@ and size of retrieved updates is equal to 100 (max count of retrieved updates) * Extensions `getUpdates` now will receive only not nullable `limit` parameter -### 0.26.4 +## 0.25.1 -* `TelegramBotAPI`: - * Now any getting of updates will return `UnknownUpdateType` when inside of deserialization will be - `SerializationException` or `NotImplemented` error - * `CallbackGame` currently is an object - * It is possible to use `CallbackGame` for now - * `CallbackGameInlineKeyboardButton` now will not accept `callbackGame` as income object - * Now it is possible to pass exception handler in webhook - -### 0.26.3 - -* `TelegramBotAPI`: - * `CallbackGameInlineKeyboardButton` was added - ([Issue-79](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/79), - [PR-80](https://github.com/InsanusMokrassar/TelegramBotAPI/pull/80)) - * `UnknownInlineKeyboardButton` was added. It is unavailable for creating, but you can receive it, for example, in - `InlineQueryResult` - * `Update` now will be created even if was `SerializationException` inside of creating the update instance - in this - case will be created `UnknownUpdateType` - * `UnknownUpdateType$rawJson` value now is included (`JsonElement`) - * **EXPERIMENTALLY** `BaseEditMessageUpdate#data` now is `CommonMessage<*>` - * Suspend inline function `handleSafely` was added - * `KtorRequestsExecutor` now use `handleSafely` instead of `try` with `supervisorScope` - * `UpdatesPolling` now use `handleSafely` instead of `try` with `supervisorScope` - -### 0.26.2 - -* `TelegramBotAPI`: - * Now `EditMediaGroupUpdate` also extends `BaseEditMessageUpdate` - * **EXPERIMENTALLY** Now all `TextSource` realisations will contain `source` field as a property inside of them -* `TelegramBotAPI-extensions-api`: - * `startGettingFlowsUpdates` extension which do not require filter (but return a new one) was added -* `TelegramBotAPI-extensions-utils`: - * Subproject was added - * `filterBaseMessageUpdates`, `filterSentMediaGroupUpdates` and `filterEditMediaGroupUpdates` extensions was added - * `filterCommandsWithArgs`, `filterExactCommands` and `filterCommandsInsideTextMessages` extensions was added - * `asContentMessagesFlow`, `asChatEventsFlow` and `asUnknownMessagesFlow` extensions was added - * `withContentType` extension was added - * `onlyAnimationContentMessages` extension was added - * `onlyAudioContentMessages` extension was added - * `onlyContactContentMessages` extension was added - * `onlyDiceContentMessages` extension was added - * `onlyDocumentContentMessages` extension was added - * `onlyGameContentMessages` extension was added - * `onlyInvoiceContentMessages` extension was added - * `onlyLocationContentMessages` extension was added - * `onlyPhotoContentMessages` extension was added - * `onlyPollContentMessages` extension was added - * `onlyStickerContentMessages` extension was added - * `onlyTextContentMessages` extension was added - * `onlyVenueContentMessages` extension was added - * `onlyVideoContentMessages` extension was added - * `onlyVideoNoteContentMessages` extension was added - * `onlyVoiceContentMessages` extension was added - -### 0.26.1 - -* `TelegramBotAPI`: - * `BotCommand` now will check and throw error in case when command or description lengths is/are incorrect - * `StorageFile` now is common for all platforms - * JavaScript realization was removed due to its redundancy - * JVM realization was replaced with `fun` factory - * `StorageFile` now able to accept any factory of `Input` - * `StorageFileInfo` was added to avoid strange collisions with throws in `StorageFile` - * Fixes issue with `hashTag` for markdown - * `InvalidPhotoDimensionsException` was added for cases when `PHOTO_INVALID_DIMENSION` answer received - * Other fixes +* Update kotlin: `1.3.70` -> `1.3.71` +* Fix of error inside of update utils for media groups ## 0.25.0 @@ -540,21 +545,7 @@ * `FlowsUpdatesFilter` now have two additional flows: `pollAnswerFlow`, `unknownUpdateTypeFlow` * `ExtendedUser` (`typealias`) was added as a `PreviewFeature` -### 0.25.1 - -* Update kotlin: `1.3.70` -> `1.3.71` -* Fix of error inside of update utils for media groups - -## 0.24.0 - -* `TelegramBotAPI`: - * All suspend functions for `RequestsExecutor` was removed (due to replacement into - [TelegramBotAPI extensions project](TelegramBotAPI-extensions-api/README.md)) - * `ForwardFromChannelInfo#channelChat` now is `ChannelChat` instead of `Chat` -* `TelegramBotAPI-extensions-api`: - * Most part of sending media messages functions was removed and replaced with their `InputFile` args analogs - -### 0.24.1 +## 0.24.1 * `TelegramBotAPI`: * `UpdateReceiver` was replaced to the package `com.github.insanusmokrassar.TelegramBotAPI.updateshandlers` @@ -580,6 +571,47 @@ parameter * `startGettingUpdates` with `receiver` and `allowedUpdates` parameters now will handle updates by itself +## 0.24.0 + +* `TelegramBotAPI`: + * All suspend functions for `RequestsExecutor` was removed (due to replacement into + [TelegramBotAPI extensions project](TelegramBotAPI-extensions-api/README.md)) + * `ForwardFromChannelInfo#channelChat` now is `ChannelChat` instead of `Chat` +* `TelegramBotAPI-extensions-api`: + * Most part of sending media messages functions was removed and replaced with their `InputFile` args analogs + +## 0.23.3 Project separating prepare version + +__API Extensions__ + +* Project created +* For `SendPhoto` was added new functions for uploading of `MultipartFile` +* `deleteWebhook` extension for `RequestsExecutor` was added + +__Telegram Bot API__ + +* All `RequestsExecutor` extensions related to Telegram Bots API was replaced into `API Extensions` project + +## 0.23.2 + +* Fixes in `InputMedia` - `media` field was not included to serialization + +## 0.23.1 + +* Versions updates: + * Klock `1.8.6` -> `1.8.7` + * Ktor `1.3.0` -> `1.3.1` +* Now it is possible to get updates by polling with custom executor engine +* `CommonMultipartFileRequest` now is internal +* Added `LiveLocation` class for more useful tracking live locations +* `InvoiceOfPayment` is renamed to `InvoiceContent` and now is `MessageContent` instead of `PaymentInfo` +* `SendInvoice` now return `ContentMessage` +* `paymentInfo` inside of `CommonMessageImpl` now can be set only to `SuccessfulPaymentInfo` +* Added `RecordVideoNoteAction` and `UploadVideoNoteAction` for `record_video_note` and `upload_video_note` actions +* For most part of messages was added `RequestsExecutor` extensions for more useful way of usage +* `toInputFile` extensions now will return more exact types +* Now it is possible to send broadcast channels size for `FlowsUpdatesFilter` + ## 0.23.0 TelegramBotAPI 4.6 * `Poll` now is sealed class @@ -615,37 +647,25 @@ * `GetMe` now return `ExtendedBot` object * Now extension `javaLocale` is extension for `CommonUser` -### 0.23.1 +## 0.22.2 CashTag and independent updates handling -* Versions updates: - * Klock `1.8.6` -> `1.8.7` - * Ktor `1.3.0` -> `1.3.1` -* Now it is possible to get updates by polling with custom executor engine -* `CommonMultipartFileRequest` now is internal -* Added `LiveLocation` class for more useful tracking live locations -* `InvoiceOfPayment` is renamed to `InvoiceContent` and now is `MessageContent` instead of `PaymentInfo` -* `SendInvoice` now return `ContentMessage` -* `paymentInfo` inside of `CommonMessageImpl` now can be set only to `SuccessfulPaymentInfo` -* Added `RecordVideoNoteAction` and `UploadVideoNoteAction` for `record_video_note` and `upload_video_note` actions -* For most part of messages was added `RequestsExecutor` extensions for more useful way of usage -* `toInputFile` extensions now will return more exact types -* Now it is possible to send broadcast channels size for `FlowsUpdatesFilter` +* `cashtag` entity type was added +* Several `Unknown*` realizations was added: + * `UnknownUpdateType` + * `UnknownMessageType` + * `UnknownChatType` + * `UnknownCallbackQueryType` +* `UpdatesFilter` now have one additional income callback: `unknownUpdateTypeCallback` + * `createSimpleUpdateFilter` can receive one more callback: `unknownCallback` (for `unknownUpdateTypeCallback`) -### 0.23.2 +## 0.22.1 MediaContent#asInputMedia -* Fixes in `InputMedia` - `media` field was not included to serialization - -### 0.23.3 Project separating prepare version - -__API Extensions__ - -* Project created -* For `SendPhoto` was added new functions for uploading of `MultipartFile` -* `deleteWebhook` extension for `RequestsExecutor` was added - -__Telegram Bot API__ - -* All `RequestsExecutor` extensions related to Telegram Bots API was replaced into `API Extensions` project +* All `MediaContent` instances now can create their `InputMedia` analog +* New annotation `PreviewFeature` was added to mark new thing as preview for the time +while they can work incorrectly +* Added links utils: + * `makeLinkToMessage` have two signatures - for direct creating using username and for abstract creating using + chat id ## 0.22.0 @@ -715,26 +735,6 @@ mistake - don't hesitate to say this.** * Version updates: * Ktor `1.2.6` -> `1.3.0` -### 0.22.1 MediaContent#asInputMedia - -* All `MediaContent` instances now can create their `InputMedia` analog -* New annotation `PreviewFeature` was added to mark new thing as preview for the time -while they can work incorrectly -* Added links utils: - * `makeLinkToMessage` have two signatures - for direct creating using username and for abstract creating using - chat id - -### 0.22.2 CashTag and independent updates handling - -* `cashtag` entity type was added -* Several `Unknown*` realizations was added: - * `UnknownUpdateType` - * `UnknownMessageType` - * `UnknownChatType` - * `UnknownCallbackQueryType` -* `UpdatesFilter` now have one additional income callback: `unknownUpdateTypeCallback` - * `createSimpleUpdateFilter` can receive one more callback: `unknownCallback` (for `unknownUpdateTypeCallback`) - ## 0.21.0 TelegramBotAPI 4.5 * _**All `MessageEntity`'es now are replaced with `TextPart`**_ @@ -765,15 +765,22 @@ bot. * Klock `1.8.0` -> `1.8.6` * UUID `0.0.6` -> `0.0.7` -## 0.20.0 MPP Migration +## 0.20.4 -* Time library change: `joda-time` -> `com.soywiz.korlibs.klock:klock` -* `Currencied` now using as `currency` value with type `String` - * For `Java` there is `Currencied#javaCurrency` extension function, which will give an old currency work way -* `User` now have no field `userLocale` - * For `Java` there is `User#javaLocale` extension function, which will give an old locale work way +* Now `setWebhook` supports setting up of path for listening +* Now `setWebhook` supports custom listen address even if certificate was not provided -### 0.20.1 +## 0.20.3 + +* Now `LeftChatMamber` is a `CommonEvent` + +## 0.20.2 + +* New exception type `MessageIsNotModifierException` was added +* New exception type `MessageToEditNotFoundException` was added +* Now exceptions in requests will be caught correctly + +## 0.20.1 * `User` now implement `PrivateChat` * `TextMentionMessageEntity` now accept `PrivateChat` instead of `User` in main constructor @@ -787,20 +794,13 @@ bot. * A lot of `TextSource` implementors was added. More info [here](src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/MessageEntity/textsources/) * All `MessageEntity` implementations now are using new `TextSource` analogues as delegates -### 0.20.2 +## 0.20.0 MPP Migration -* New exception type `MessageIsNotModifierException` was added -* New exception type `MessageToEditNotFoundException` was added -* Now exceptions in requests will be caught correctly - -### 0.20.3 - -* Now `LeftChatMamber` is a `CommonEvent` - -### 0.20.4 - -* Now `setWebhook` supports setting up of path for listening -* Now `setWebhook` supports custom listen address even if certificate was not provided +* Time library change: `joda-time` -> `com.soywiz.korlibs.klock:klock` +* `Currencied` now using as `currency` value with type `String` + * For `Java` there is `Currencied#javaCurrency` extension function, which will give an old currency work way +* `User` now have no field `userLocale` + * For `Java` there is `User#javaLocale` extension function, which will give an old locale work way ## 0.19.0 ImplicitReflection removing @@ -832,6 +832,18 @@ bot. * `com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor#constructor(token, client, hostUrl, callsFactories, excludeDefaultFactories, requestsLimiter, jsonFormatter)` * `com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor#constructor(token, engine, hostUrl)` +## 0.18.1 Libraries update + +* Update libraries: + * `kotlin`: 1.3.41 -> 1.3.61 + * `kotlin coroutines`: 1.2.2 -> 1.3.2 + * `kotlin serialization`: 0.11.1 -> 0.14.0 + * `joda time`: 2.10.3 -> 2.10.5 + * `ktor`: 1.2.3 -> 1.2.6 +* `BotAction` now will be deserialized in a little bit other way + * `BotActionSerializer` now is internal +* Most part of serializers now are objects (instead of classes as was previously) + ## 0.18.0 Raws cleaning * Made internal and not available outside of library: @@ -852,18 +864,6 @@ bot. * `Game` now is not serializable and have no additional trash, related to serialization * `TelegramFile` was removed -### 0.18.1 Libraries update - -* Update libraries: - * `kotlin`: 1.3.41 -> 1.3.61 - * `kotlin coroutines`: 1.2.2 -> 1.3.2 - * `kotlin serialization`: 0.11.1 -> 0.14.0 - * `joda time`: 2.10.3 -> 2.10.5 - * `ktor`: 1.2.3 -> 1.2.6 -* `BotAction` now will be deserialized in a little bit other way - * `BotActionSerializer` now is internal -* Most part of serializers now are objects (instead of classes as was previously) - ## 0.17.0 July 29, 2019 API Update Libraries updates: @@ -894,6 +894,12 @@ or `!`) and username token (`@`) or end of command (any space character) * `TelegramAPIUrlsKeeper` was added to provide more comfortable work with file urls and other things like this +## 0.16.1 + +* Now old uncommon `CaptionedMediaContent` and `CaptionedInputMedia` are replaced by almost the same +interfaces `CaptionedInput` and `CaptionedOutput`. They are both implementing `Captioned` interface +* `AnimationContent` now is `CaptionedInput` + ## 0.16.0 Bot API 4.3 * `LoginURL` and `LoginURLInlineKeyboardButton` has been added @@ -903,12 +909,6 @@ like this * `String#asUsername` method renamed to `String#toUsername` * Several `toChatId` extensions added -### 0.16.1 - -* Now old uncommon `CaptionedMediaContent` and `CaptionedInputMedia` are replaced by almost the same -interfaces `CaptionedInput` and `CaptionedOutput`. They are both implementing `Captioned` interface -* `AnimationContent` now is `CaptionedInput` - ## 0.15.0 * Old `UpdatesPoller` removed (was deprecated) @@ -921,6 +921,20 @@ interfaces `CaptionedInput` and `CaptionedOutput`. They are both implementing `C * They are using `timeoutMillis` instead of `requestsDelayMillis` * Added `CIO` ktor client engine as lightweight default engine for long-polling +## 0.14.2 MediaGroups edit hotfixes + +* `convertWithMediaGroupUpdates` extension added +* All media group converting extensions are internal for now +* Fixes according to updates in converting of updates to media group updates + +## 0.14.1 + +* Replace `UpdatesFilter` and `UpdatesPoller` into another package +* Replace `WebhookPrivateKeyConfig` +* Added `FlowsUpdatesFilter` +* `UpdatesFilter` now have additional callback for polls +* `StopPoll#replyMarkup` now is optional + ## 0.14.0 * Now library have no default engine for both webhooks and requests executor. It is required for clients to set @@ -939,20 +953,6 @@ some default library * `ForwardedFromChannelMessage` - for messages from channels * Changed logic of forwarded messages preparing -### 0.14.1 - -* Replace `UpdatesFilter` and `UpdatesPoller` into another package -* Replace `WebhookPrivateKeyConfig` -* Added `FlowsUpdatesFilter` -* `UpdatesFilter` now have additional callback for polls -* `StopPoll#replyMarkup` now is optional - -### 0.14.2 MediaGroups edit hotfixes - -* `convertWithMediaGroupUpdates` extension added -* All media group converting extensions are internal for now -* Fixes according to updates in converting of updates to media group updates - ## 0.13.0 Telegram Polls * Type `PollOption` and `AnonymousPollOption` added @@ -972,6 +972,64 @@ by their parents * **BREAK CHANGES** Now `ForwardedMessages` can be `AnonymousForwardedMessage` and `PublicForwardedMessage`. Old implementations now extend `PublicForwardedMessage` +## 0.12.7 Hotfix version + +* Now temporary all requests of input media will contains `file` field + +## 0.12.6 Libraries updates + +* `kotlin` version `1.3.21` -> `1.3.30` +* `kotlin coroutines` version `1.1.1` -> `1.2.0` +* `kotlin serialization` version `0.10.0` -> `0.11.0` +* `ktor` version `1.1.2` -> `1.1.3` +* Added `DeleteWebhook` request +* All default `startGettingOfUpdates` (in fact - method `start` of `UpdatesPoller`) are suspend and +will try to delete webhook + +## 0.12.5 `MediaContent` improvements + +* Now `MediaGroupContent` is `MediaContent` +* All `MedaContent` now have no generics and have basic `TelegramMediaFile` media field + +## 0.12.4 + +* Optimized preparing of media group in `UpdatesPoller` +* Add `CommonLimiter` +* Add `MessageEntity#asHtmlSource` and `String#toHtml` +* Add tools for work with html captions and texts +* `MessageContent` which using captions or text now have default parse mode `HTMLParseMode` due to issue with escaping +of `]` in links titles +* Added `Markdown` and `HTML` type aliases which actually means `MarkdownParseMode` and `HTMLParseMode` +* `ChatId` now have extension `link` which will automatically create link like `tg://user?id=` +* Created a few of methods for all supported formats of text like bold, italic, links and others +* Rewritten `MessageEntities` to use new formatting options + +## 0.12.3 Cleaning + +* Refactor, optimizing and cleaning of code +* Removed deprecated method `T#toJsonWithoutNulls()` +* Renamed instances of `MediaGroupMessage`s and refactored their interfaces. `ChannelMediaGroupMessage` +will not contain `user` field (but `CommonMediaGroupMessage` will have) +* Now `MediaCollectionContent` is `MediaContent` (classes of this interface must choose best +media for present out) + * `PhotoContent` now choose biggest photo size from its collection as `media` +* Fix in order of media group messages which was received by webhooks + +## 0.12.2 + +* New in `MediaGroupUpdate`: + * It is subtype of `Update` and can be use as regular update with list of messages + * Data now is list with `MediaGroupMessage` + * Added field `origins` which represent origin updates for `MediaGroupMessage` + * `updateId` now represent LAST id of origins updates +* `UpdatesFilter` and other objects now work with `UpdateReceiver` as common supertype +for receivers. + +## 0.12.1 Hotfix for media groups + +* Added additional media group types (like `MessageMediaGroupUpdate`) +* Fixed handling of media group updates in `UpdatesFilter` + ## 0.12.0 Webhooks * Added `DataRequest` interface which replace `Data` interface @@ -995,64 +1053,6 @@ implementations now extend `PublicForwardedMessage` * Separated execute extensions (now they are in file `Executes`) and poller creating extensions * `BaseMessageUpdate#toMediaGroupUpdate()` will also check condition when update-receiver already is `MediaGroupUpdate` -### 0.12.1 Hotfix for media groups - -* Added additional media group types (like `MessageMediaGroupUpdate`) -* Fixed handling of media group updates in `UpdatesFilter` - -### 0.12.2 - -* New in `MediaGroupUpdate`: - * It is subtype of `Update` and can be use as regular update with list of messages - * Data now is list with `MediaGroupMessage` - * Added field `origins` which represent origin updates for `MediaGroupMessage` - * `updateId` now represent LAST id of origins updates -* `UpdatesFilter` and other objects now work with `UpdateReceiver` as common supertype -for receivers. - -### 0.12.3 Cleaning - -* Refactor, optimizing and cleaning of code -* Removed deprecated method `T#toJsonWithoutNulls()` -* Renamed instances of `MediaGroupMessage`s and refactored their interfaces. `ChannelMediaGroupMessage` -will not contain `user` field (but `CommonMediaGroupMessage` will have) -* Now `MediaCollectionContent` is `MediaContent` (classes of this interface must choose best -media for present out) - * `PhotoContent` now choose biggest photo size from its collection as `media` -* Fix in order of media group messages which was received by webhooks - -### 0.12.4 - -* Optimized preparing of media group in `UpdatesPoller` -* Add `CommonLimiter` -* Add `MessageEntity#asHtmlSource` and `String#toHtml` -* Add tools for work with html captions and texts -* `MessageContent` which using captions or text now have default parse mode `HTMLParseMode` due to issue with escaping -of `]` in links titles -* Added `Markdown` and `HTML` type aliases which actually means `MarkdownParseMode` and `HTMLParseMode` -* `ChatId` now have extension `link` which will automatically create link like `tg://user?id=` -* Created a few of methods for all supported formats of text like bold, italic, links and others -* Rewritten `MessageEntities` to use new formatting options - -### 0.12.5 `MediaContent` improvements - -* Now `MediaGroupContent` is `MediaContent` -* All `MedaContent` now have no generics and have basic `TelegramMediaFile` media field - -### 0.12.6 Libraries updates - -* `kotlin` version `1.3.21` -> `1.3.30` -* `kotlin coroutines` version `1.1.1` -> `1.2.0` -* `kotlin serialization` version `0.10.0` -> `0.11.0` -* `ktor` version `1.1.2` -> `1.1.3` -* Added `DeleteWebhook` request -* All default `startGettingOfUpdates` (in fact - method `start` of `UpdatesPoller`) are suspend and -will try to delete webhook - -### 0.12.7 Hotfix version - -* Now temporary all requests of input media will contains `file` field - ## 0.11.0 * Kotlin `1.3.11` -> `1.3.21` @@ -1060,6 +1060,27 @@ will try to delete webhook * Kotlin serialization `0.9.1` -> `0.10.0` * Ktor `1.1.1` -> `1.1.2` +## 0.10.3 + +* Hotfix for username data class + +## 0.10.2 + +* Fixes in `Username` + * Now you can create username object using string which is not starting with `@` + * Now `Username` correctly comparing with strings, which are not starting with `@` +* Now most part of usernames in library have type `Username` +* Fix `replyMarkup` in `InlineQueryResultArticle` + +## 0.10.1 + +* Change algorithm of `executeUnsafe`: now it use loop instead of recursive calling +* Add additional `startGettingUpdates` with better management of received updates for media groups +* Now `MediaGroupMessage` is `CommonMessage` with `MediaGroupContent` content +* Added extensions `replyTo`, `forwarded` and `chat` for `List` for comfortable +work with media groups lists +* Fix `parseMode` of `InputTextMessageContent` + ## 0.10.0 * Most part of abstractions was replaced from `requests` and `types` on more high level @@ -1071,37 +1092,22 @@ will try to delete webhook * Fixes in edition of inline messages and their result types * Replace basic exception and add `ReplyMessageNotFound` exception -### 0.10.1 +## 0.9.3 -* Change algorithm of `executeUnsafe`: now it use loop instead of recursive calling -* Add additional `startGettingUpdates` with better management of received updates for media groups -* Now `MediaGroupMessage` is `CommonMessage` with `MediaGroupContent` content -* Added extensions `replyTo`, `forwarded` and `chat` for `List` for comfortable -work with media groups lists -* Fix `parseMode` of `InputTextMessageContent` +* `KtorRequestsExecutor` now can use custom `JSON` string formatter (by default - non strict) +* `ResponseParameters` renamed to `Response` +* Add `RequestError` sealed class and described in documentation known errors +* Add `ResponseParametersRaw` which can create error based on input parameters +* Add `parameters` field in `Response` and remove useless fields from `Response` +* Add `leftToRetry` parameter in `RetryAfterError` +* Add handling of `RetryAfterError` in `KtorRequestsExecutor` -### 0.10.2 +## 0.9.2 -* Fixes in `Username` - * Now you can create username object using string which is not starting with `@` - * Now `Username` correctly comparing with strings, which are not starting with `@` -* Now most part of usernames in library have type `Username` -* Fix `replyMarkup` in `InlineQueryResultArticle` +* `RequestsExecutor#executeAsync(Request, CoroutineScope)` now will return `Deferred` for cases when you need result +* `RequestsExecutor#executeUnsafe` will automatically retry request if it was unsuccessful and retries > 0 -### 0.10.3 - -* Hotfix for username data class - -## 0.9.0 - -* Old extension `OkHttpClient.Builder#useWith` now deprecated and must be replaced by the same in -`com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor` package -* Replace `ProxySettings` data class in `settings` package, deprecate old link -* `BaseRequestsExecutor` now have no it's own scope -* Add `RequestLimiter` and base realisations -* Now `KtorRequestsExecutor` can receive as one of parameters `RequestLimiter` (by default - `EmptyLimiter`) - -### 0.9.1 +## 0.9.1 * Updated built-in lengths restrictions * Apply restrictions of text limit for sending messages @@ -1113,28 +1119,22 @@ must be regular text * Add `ResendableContent#createResends` which create adapted list of resends for content * Add `TextContent` own `createResends` realisation -### 0.9.2 +## 0.9.0 -* `RequestsExecutor#executeAsync(Request, CoroutineScope)` now will return `Deferred` for cases when you need result -* `RequestsExecutor#executeUnsafe` will automatically retry request if it was unsuccessful and retries > 0 +* Old extension `OkHttpClient.Builder#useWith` now deprecated and must be replaced by the same in +`com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor` package +* Replace `ProxySettings` data class in `settings` package, deprecate old link +* `BaseRequestsExecutor` now have no it's own scope +* Add `RequestLimiter` and base realisations +* Now `KtorRequestsExecutor` can receive as one of parameters `RequestLimiter` (by default - `EmptyLimiter`) -### 0.9.3 - -* `KtorRequestsExecutor` now can use custom `JSON` string formatter (by default - non strict) -* `ResponseParameters` renamed to `Response` -* Add `RequestError` sealed class and described in documentation known errors -* Add `ResponseParametersRaw` which can create error based on input parameters -* Add `parameters` field in `Response` and remove useless fields from `Response` -* Add `leftToRetry` parameter in `RetryAfterError` -* Add handling of `RetryAfterError` in `KtorRequestsExecutor` - -### 0.8.5 +## 0.8.5 * Add extension `String#toMarkdown` * Fix of inserting of text when create Markdown-adapted text from text and text entities * Fix default realisation of MessageEntity#asMarkdownSource -### 0.8.4 +## 0.8.4 * Added `createMarkdownText` and extensions for `CaptionedMediaContent` and `TextContent` * Added `ResendableContent` and realize in different contents @@ -1155,17 +1155,17 @@ must be regular text * Media groups now are separated type of updates and you can subscribe on that receiving directly * Now `AdministratorChatMember` is interface and `CreatorChatMember` implement it -### 0.8.3 +## 0.8.3 * Now `ForwardedMessage` contains nullable `from` -### 0.8.2 +## 0.8.2 * Add `FromUserMessage` which must be implemented in all messages realisations which have `user` field * Add `CommonMediaGroupMessage` which in fact extension of `MediaGroupMessage` with implementation of `FromUserMessage` * `CommonMessageImpl` now implementing `FromUserMessage` -### 0.8.1 +## 0.8.1 * Update `MediaGroupMessage` interface * Add implementation of `MediaGroupMessage`