From b1304ef10de3acfcf5f8309fb80c0dbeb08be105 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 1 Sep 2026 22:42:58 +0600 Subject: [PATCH] feat(api)!: use direct message threads for drafts BREAKING CHANGE: draft APIs replace threadId/MessageThreadId with directMessageThreadId/DirectMessageThreadId and serialize direct_messages_topic_id. --- CHANGELOG.md | 7 +- tgbotapi.api/api/tgbotapi.api.api | 84 +++++++++--------- .../extensions/api/send/SendMessageDraft.kt | 79 ++++++++++++----- .../api/send/SendRichMessageDraft.kt | 9 +- .../tgbotapi/extensions/api/send/Sends.kt | 47 ++++++---- .../api/send/SendMessageDraftTest.kt | 87 +++++++++++++++++++ .../api/send/SendRichMessageDraftTest.kt | 19 ++-- tgbotapi.core/api/tgbotapi.core.api | 28 +++--- .../requests/send/SendMessageDraft.kt | 34 +++++--- .../requests/send/SendRichMessageDraft.kt | 11 +-- .../tgbotapi/types/GeneralBotApi103Test.kt | 16 +++- 11 files changed, 288 insertions(+), 133 deletions(-) create mode 100644 tgbotapi.api/src/commonTest/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessageDraftTest.kt diff --git a/CHANGELOG.md b/CHANGELOG.md index 99ab037307..9bf0cef714 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,14 +11,16 @@ * `FlowsUpdatesFilter` gained the abstract `messageGenerationStoppedUpdatesFlow` property; direct implementations must supply the flow, while subclasses of `AbstractFlowsUpdatesFilter` inherit the filtered implementation * `RichText` gained the public `isValidRichMessageButtonText` contract and the `RichText`/`RichBlock`/`InputRichBlock` sealed hierarchies gained Bot API 10.3 variants; permitted same-module implementations and exhaustive `when` expressions must cover the new contracts and variants * `SendRichMessageDraft`, `sendRichMessageDraft`, and the corresponding generic `send` overload widened `chatId` from `ChatId` to `IdChatIdentifier`; source calls passing `ChatId` remain valid, while the JVM signatures changed +* `SendMessageDraft` and `SendRichMessageDraft` request/API surfaces replaced `threadId: MessageThreadId?` with `directMessageThreadId: DirectMessageThreadId?`; serialized requests now use `direct_messages_topic_id` instead of `message_thread_id`, and JVM signatures changed -**Migration advice**: Direct and generic `send` extensions accept either `receiverUserId = userId, callbackQueryId = callbackId, replaceCallbackQueryMessage = ...` or `ephemeralMessageParameters = EphemeralMessageParameters(receiverUserId = userId, callbackQueryId = callbackId, replaceCallbackQueryMessage = ...)`; send-request constructors and `reply` API overloads require the parameter-object form; add `canSendWelcomeMessages` and `messageGenerationStoppedUpdatesFlow` to direct interface implementations; add Bot API 10.3 branches to exhaustive rich-type `when` expressions +**Migration advice**: Direct and generic `send` extensions accept either `receiverUserId = userId, callbackQueryId = callbackId, replaceCallbackQueryMessage = ...` or `ephemeralMessageParameters = EphemeralMessageParameters(receiverUserId = userId, callbackQueryId = callbackId, replaceCallbackQueryMessage = ...)`; send-request constructors and `reply` API overloads require the parameter-object form; replace draft `threadId = MessageThreadId(...)` arguments with `directMessageThreadId = DirectMessageThreadId(...)`; add `canSendWelcomeMessages` and `messageGenerationStoppedUpdatesFlow` to direct interface implementations; add Bot API 10.3 branches to exhaustive rich-type `when` expressions **Compatibility note**: The new `text`/`entities`/`isPrivate` fields of `GiftSentOrReceivedEvent.UniqueGift.Common` and `GiftSentOrReceivedEvent.UniqueGift.ReceivedInBusinessAccount` are trailing constructor parameters; existing positional argument and `componentN` order is preserved * `Core`: * (`Ephemeral messages`) Added `EphemeralMessageParameters`; replaced the flat send-request recipient/callback parameters with `ephemeralMessageParameters`, including callback-message replacement support - * (`Rich Messages`) Widened `SendRichMessageDraft.chatId` from `ChatId` to `IdChatIdentifier`, allowing thread-bearing numeric identifiers to supply the default message thread + * (`Rich Messages`) Widened `SendRichMessageDraft.chatId` from `ChatId` to `IdChatIdentifier`, allowing contextual numeric identifiers to supply the default direct messages topic + * (`General`) Migrated `SendMessageDraft` and `SendRichMessageDraft` from `message_thread_id`/`MessageThreadId` to `direct_messages_topic_id`/`DirectMessageThreadId` * (`Ephemeral messages`) Added new-file uploads for `editEphemeralMessageMedia`; collected secondary live-photo `photo` attachments for ephemeral and regular media edits, media groups, and paid media; added `showCaptionAboveMedia` for caption edits and rich-message text edits * (`Ephemeral messages`) Added `canSendWelcomeMessages` administrator right and `promoteChatMember` parameter * (`Rich Messages`) Added rich-message button actions, rich-text/button-row entities, typed button styles/alignment, expandable block quotations, compact tables, document blocks, document media links and direct document uploads @@ -33,6 +35,7 @@ * `API`: * (`Ephemeral messages`) Migrated send/reply extension surfaces to `ephemeralMessageParameters`; added rich ephemeral text editing and caption-above-media support * (`Rich Messages`) Widened `sendRichMessageDraft` and the corresponding generic `send` overload from `ChatId` to `IdChatIdentifier` + * (`General`) Migrated direct, streaming-flow, `Chat`, builder, and generic draft-send extensions from `threadId`/`MessageThreadId` to `directMessageThreadId`/`DirectMessageThreadId` * (`Ephemeral messages`) Retained 172 non-deprecated direct and generic `send` overloads accepting `receiverUserId`/`callbackQueryId`/`replaceCallbackQueryMessage` as an alternative API form; every overload delegates to the corresponding `ephemeralMessageParameters` overload * (`Ephemeral messages`) Added named rich-message overloads and generic `InputRichMessage`/`RichMessageContent` aliases across both ephemeral reply families * (`General`) Added `canStop`/`keepOnStop` to `sendMessageDraft`/`sendRichMessageDraft` extension surfaces, including streaming draft flows and `send` overloads diff --git a/tgbotapi.api/api/tgbotapi.api.api b/tgbotapi.api/api/tgbotapi.api.api index da157d2055..dc484b6734 100644 --- a/tgbotapi.api/api/tgbotapi.api.api +++ b/tgbotapi.api/api/tgbotapi.api.api @@ -2171,28 +2171,28 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendLiveLocationKt { public final class dev/inmo/tgbotapi/extensions/api/send/SendMessageDraftKt { public static final fun getGlobalDraftIdAllocator ()Ldev/inmo/tgbotapi/utils/DraftIdAllocator; - public static final fun sendMessageDraft-43MdJKs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendMessageDraft-43MdJKs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun sendMessageDraft-43MdJKs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun sendMessageDraft-43MdJKs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun sendMessageDraft-ZrJ4e30 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendMessageDraft-ZrJ4e30 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun sendMessageDraft-ZrJ4e30$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun sendMessageDraft-ZrJ4e30$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun sendMessageDraft-bSf9ep8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendMessageDraft-bSf9ep8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendMessageDraft-bSf9ep8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun sendMessageDraft-bSf9ep8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun sendMessageDraft-bSf9ep8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun sendMessageDraft-bSf9ep8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun sendMessageDraft-bSf9ep8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun sendMessageDraft-bSf9ep8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun sendMessageDraftFlow-aLPLotU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun sendMessageDraftFlow-aLPLotU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun sendMessageDraftFlowWithTexts-aLPLotU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun sendMessageDraftFlowWithTexts-aLPLotU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun sendMessageDraftFlowWithTextsAndParseMode-aLPLotU (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun sendMessageDraftFlowWithTextsAndParseMode-aLPLotU$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun sendMessageDraft-YbdynyA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendMessageDraft-YbdynyA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sendMessageDraft-YbdynyA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun sendMessageDraft-YbdynyA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun sendMessageDraft-kmLdejg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendMessageDraft-kmLdejg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sendMessageDraft-kmLdejg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun sendMessageDraft-kmLdejg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun sendMessageDraft-u66x3No (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendMessageDraft-u66x3No (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendMessageDraft-u66x3No (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun sendMessageDraft-u66x3No (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sendMessageDraft-u66x3No$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun sendMessageDraft-u66x3No$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun sendMessageDraft-u66x3No$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun sendMessageDraft-u66x3No$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun sendMessageDraftFlow-I4TxxCg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sendMessageDraftFlow-I4TxxCg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun sendMessageDraftFlowWithTexts-I4TxxCg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sendMessageDraftFlowWithTexts-I4TxxCg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun sendMessageDraftFlowWithTextsAndParseMode-I4TxxCg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sendMessageDraftFlowWithTextsAndParseMode-I4TxxCg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Lkotlinx/coroutines/flow/Flow;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ldev/inmo/tgbotapi/types/DraftId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; } public final class dev/inmo/tgbotapi/extensions/api/send/SendMessageKt { @@ -2263,8 +2263,8 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendMessageKt { } public final class dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraftKt { - public static final fun sendRichMessageDraft-ISPvrcY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun sendRichMessageDraft-ISPvrcY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun sendRichMessageDraft-rV6_g2g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun sendRichMessageDraft-rV6_g2g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; } public final class dev/inmo/tgbotapi/extensions/api/send/SendRichMessageKt { @@ -2343,10 +2343,6 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendsKt { public static final fun send-2IwcvHg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun send-2IwcvHg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun send-2IwcvHg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun send-43MdJKs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun send-43MdJKs (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun send-43MdJKs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun send-43MdJKs$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun send-59dkE5s (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;DDLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-59dkE5s (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/AnimationFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLjava/lang/Long;Ljava/lang/Integer;Ljava/lang/Integer;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-59dkE5s (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;DDLjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -2379,8 +2375,6 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendsKt { public static synthetic fun send-BKdLCOc$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;Ljava/util/List;Ljava/util/List;Ljava/util/List;ZZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun send-I3_Lavo (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;ZZZZZZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun send-I3_Lavo$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/lang/Integer;Ljava/util/List;Ljava/lang/String;Ljava/lang/String;ZZZZZZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/InlineKeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun send-ISPvrcY (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun send-ISPvrcY$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun send-JGcy_pA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/polls/RegularPoll;Ljava/util/List;ZLjava/util/List;ZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-JGcy_pA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ljava/util/List;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-JGcy_pA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/polls/RegularPoll;Ljava/util/List;ZLjava/util/List;ZZLdev/inmo/tgbotapi/types/polls/ScheduledCloseInfo;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -2539,10 +2533,10 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendsKt { public static synthetic fun send-Y9bTzIg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun send-Y9bTzIg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun send-Y9bTzIg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/venue/Venue;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun send-ZrJ4e30 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun send-ZrJ4e30 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun send-ZrJ4e30$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun send-ZrJ4e30$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun send-YbdynyA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun send-YbdynyA (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun send-YbdynyA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun send-YbdynyA$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun send-Zzzb9Qk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-Zzzb9Qk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/PhotoSize;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-Zzzb9Qk (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -2575,14 +2569,6 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendsKt { public static synthetic fun send-b7ftvUk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/files/VideoNoteFile;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun send-b7ftvUk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/location/StaticLocation;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun send-b7ftvUk$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/venue/Venue;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static final fun send-bSf9ep8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun send-bSf9ep8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun send-bSf9ep8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static final fun send-bSf9ep8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public static synthetic fun send-bSf9ep8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun send-bSf9ep8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun send-bSf9ep8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; - public static synthetic fun send-bSf9ep8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun send-coHvRTg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-coHvRTg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun send-coHvRTg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; @@ -2619,6 +2605,10 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendsKt { public static synthetic fun send-kO8K6IE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ldev/inmo/tgbotapi/types/files/VoiceFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun send-kO8K6IE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun send-kO8K6IE$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun send-kmLdejg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun send-kmLdejg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun send-kmLdejg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun send-kmLdejg$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun send-lCY-GWg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/LivePhotoFile;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-lCY-GWg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/PhotoSize;Ljava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-lCY-GWg (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/VideoFile;Ljava/util/List;ZZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; @@ -2655,6 +2645,16 @@ public final class dev/inmo/tgbotapi/extensions/api/send/SendsKt { public static final fun send-qli2uN8 (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static synthetic fun send-qli2uN8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/util/List;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static synthetic fun send-qli2uN8$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;Ljava/util/List;Ljava/util/List;ZZLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun send-rV6_g2g (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun send-rV6_g2g$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static final fun send-u66x3No (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun send-u66x3No (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun send-u66x3No (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static final fun send-u66x3No (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public static synthetic fun send-u66x3No$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun send-u66x3No$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun send-u66x3No$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLdev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; + public static synthetic fun send-u66x3No$default (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/chat/Chat;JLjava/lang/String;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; public static final fun send-usfYKJQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/files/DocumentFile;Ljava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Ljava/lang/Boolean;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-usfYKJQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ldev/inmo/tgbotapi/types/message/textsources/TextSource;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; public static final fun send-usfYKJQ (Ldev/inmo/tgbotapi/bot/RequestsExecutor;Ldev/inmo/tgbotapi/types/ChatIdentifier;Ljava/lang/String;Ldev/inmo/tgbotapi/types/LinkPreviewOptions;Ldev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/IdChatIdentifier;Ljava/lang/String;Ljava/lang/Boolean;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessageDraft.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessageDraft.kt index a1411ebb42..874308bd8a 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessageDraft.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessageDraft.kt @@ -18,15 +18,16 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.firstOrNull import kotlinx.coroutines.flow.map -import kotlin.js.JsName -import kotlin.jvm.JvmName +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ public suspend fun TelegramBot.sendMessageDraft( chatId: IdChatIdentifier, draftId: DraftId, text: String, parseMode: ParseMode? = null, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = execute( @@ -35,7 +36,7 @@ public suspend fun TelegramBot.sendMessageDraft( draftId = draftId, text = text, parseMode = parseMode, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) @@ -61,10 +62,13 @@ private suspend fun TelegramBot.sendMessageDraftFlow( public val GlobalDraftIdAllocator: DraftIdAllocator by lazy { DraftIdAllocator() } +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ public suspend fun TelegramBot.sendMessageDraftFlow( chatId: IdChatIdentifier, messagesFlow: Flow, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, draftId: DraftId? = null, canStop: Boolean? = null, keepOnStop: Boolean? = null @@ -72,15 +76,18 @@ public suspend fun TelegramBot.sendMessageDraftFlow( val draftId = draftId ?: GlobalDraftIdAllocator.allocate() return sendMessageDraftFlow( messagesFlow.map { - SendMessageDraft(chatId = chatId, draftId = draftId, entities = it, threadId = threadId, canStop = canStop, keepOnStop = keepOnStop) + SendMessageDraft(chatId = chatId, draftId = draftId, entities = it, directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop) } ) } +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ public suspend fun TelegramBot.sendMessageDraftFlowWithTextsAndParseMode( chatId: IdChatIdentifier, messagesFlow: Flow>, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, draftId: DraftId? = null, canStop: Boolean? = null, keepOnStop: Boolean? = null @@ -88,15 +95,18 @@ public suspend fun TelegramBot.sendMessageDraftFlowWithTextsAndParseMode( val draftId = draftId ?: GlobalDraftIdAllocator.allocate() return sendMessageDraftFlow( messagesFlow.map { - SendMessageDraft(chatId = chatId, draftId = draftId, text = it.first, parseMode = it.second, threadId = threadId, canStop = canStop, keepOnStop = keepOnStop) + SendMessageDraft(chatId = chatId, draftId = draftId, text = it.first, parseMode = it.second, directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop) } ) } +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ public suspend fun TelegramBot.sendMessageDraftFlowWithTexts( chatId: IdChatIdentifier, messagesFlow: Flow, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, draftId: DraftId? = null, canStop: Boolean? = null, keepOnStop: Boolean? = null @@ -107,19 +117,22 @@ public suspend fun TelegramBot.sendMessageDraftFlowWithTexts( messagesFlow = messagesFlow.map { it.escapeMarkdownV2Common() to MarkdownV2 }, - threadId = threadId, + directMessageThreadId = directMessageThreadId, draftId = draftId, canStop = canStop, keepOnStop = keepOnStop ) } +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chat]. + */ public suspend fun TelegramBot.sendMessageDraft( chat: Chat, draftId: DraftId, text: String, parseMode: ParseMode? = null, - threadId: MessageThreadId? = chat.id.threadId, + directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = sendMessageDraft( @@ -127,16 +140,19 @@ public suspend fun TelegramBot.sendMessageDraft( draftId = draftId, text = text, parseMode = parseMode, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ public suspend fun TelegramBot.sendMessageDraft( chatId: IdChatIdentifier, draftId: DraftId, entities: TextSourcesList, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = execute( @@ -144,33 +160,39 @@ public suspend fun TelegramBot.sendMessageDraft( chatId = chatId, draftId = draftId, entities = entities, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) ) +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chat]. + */ public suspend fun TelegramBot.sendMessageDraft( chat: Chat, draftId: DraftId, entities: TextSourcesList, - threadId: MessageThreadId? = chat.id.threadId, + directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = sendMessageDraft( chatId = chat.id, draftId = draftId, entities = entities, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ public suspend fun TelegramBot.sendMessageDraft( chatId: IdChatIdentifier, draftId: DraftId, separator: TextSource? = null, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null, builderBody: EntitiesBuilderBody @@ -178,16 +200,19 @@ public suspend fun TelegramBot.sendMessageDraft( chatId = chatId, draftId = draftId, entities = buildEntities(separator, builderBody), - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ public suspend fun TelegramBot.sendMessageDraft( chatId: IdChatIdentifier, draftId: DraftId, separator: String, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null, builderBody: EntitiesBuilderBody @@ -195,16 +220,19 @@ public suspend fun TelegramBot.sendMessageDraft( chatId = chatId, draftId = draftId, entities = buildEntities(separator, builderBody), - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chat]. + */ public suspend fun TelegramBot.sendMessageDraft( chat: Chat, draftId: DraftId, separator: TextSource? = null, - threadId: MessageThreadId? = chat.id.threadId, + directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null, builderBody: EntitiesBuilderBody @@ -212,17 +240,20 @@ public suspend fun TelegramBot.sendMessageDraft( chatId = chat.id, draftId = draftId, separator = separator, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop, builderBody = builderBody ) +/** + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chat]. + */ public suspend fun TelegramBot.sendMessageDraft( chat: Chat, draftId: DraftId, separator: String, - threadId: MessageThreadId? = chat.id.threadId, + directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null, builderBody: EntitiesBuilderBody @@ -230,7 +261,7 @@ public suspend fun TelegramBot.sendMessageDraft( chatId = chat.id, draftId = draftId, separator = separator, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop, builderBody = builderBody diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraft.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraft.kt index a75aa897f2..e84f4f3c2c 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraft.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraft.kt @@ -2,18 +2,19 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.TelegramBot import dev.inmo.tgbotapi.requests.send.SendRichMessageDraft +import dev.inmo.tgbotapi.types.DirectMessageThreadId import dev.inmo.tgbotapi.types.IdChatIdentifier -import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.rich.InputRichMessage /** - * @param chatId Numeric target chat identifier. Identifiers carrying a thread supply the default [threadId]. + * @param chatId Numeric target chat identifier. + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. */ public suspend fun TelegramBot.sendRichMessageDraft( chatId: IdChatIdentifier, draftId: Long, richMessage: InputRichMessage, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = execute( @@ -21,7 +22,7 @@ public suspend fun TelegramBot.sendRichMessageDraft( chatId = chatId, draftId = draftId, richMessage = richMessage, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) diff --git a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt index b0c7d83dd5..8716c19684 100644 --- a/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt +++ b/tgbotapi.api/src/commonMain/kotlin/dev/inmo/tgbotapi/extensions/api/send/Sends.kt @@ -2438,13 +2438,14 @@ public suspend fun TelegramBot.send( /** * Will execute [sendMessageDraft] request + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. */ public suspend fun TelegramBot.send( chatId: IdChatIdentifier, draftId: DraftId, text: String, parseMode: ParseMode? = null, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = sendMessageDraft( @@ -2452,20 +2453,21 @@ public suspend fun TelegramBot.send( draftId = draftId, text = text, parseMode = parseMode, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) /** * Will execute [sendMessageDraft] request + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chat]. */ public suspend fun TelegramBot.send( chat: Chat, draftId: DraftId, text: String, parseMode: ParseMode? = null, - threadId: MessageThreadId? = chat.id.threadId, + directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = sendMessageDraft( @@ -2473,57 +2475,60 @@ public suspend fun TelegramBot.send( draftId = draftId, text = text, parseMode = parseMode, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) /** * Will execute [sendMessageDraft] request + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. */ public suspend fun TelegramBot.send( chatId: IdChatIdentifier, draftId: DraftId, entities: TextSourcesList, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = sendMessageDraft( chatId = chatId, draftId = draftId, entities = entities, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) /** * Will execute [sendMessageDraft] request + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chat]. */ public suspend fun TelegramBot.send( chat: Chat, draftId: DraftId, entities: TextSourcesList, - threadId: MessageThreadId? = chat.id.threadId, + directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = sendMessageDraft( chat = chat, draftId = draftId, entities = entities, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) /** * Will execute [sendMessageDraft] request + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. */ public suspend fun TelegramBot.send( chatId: IdChatIdentifier, draftId: DraftId, separator: TextSource? = null, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null, builderBody: EntitiesBuilderBody @@ -2531,7 +2536,7 @@ public suspend fun TelegramBot.send( chatId = chatId, draftId = draftId, separator = separator, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop, builderBody = builderBody @@ -2539,12 +2544,13 @@ public suspend fun TelegramBot.send( /** * Will execute [sendMessageDraft] request + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. */ public suspend fun TelegramBot.send( chatId: IdChatIdentifier, draftId: DraftId, separator: String, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null, builderBody: EntitiesBuilderBody @@ -2552,7 +2558,7 @@ public suspend fun TelegramBot.send( chatId = chatId, draftId = draftId, separator = separator, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop, builderBody = builderBody @@ -2560,12 +2566,13 @@ public suspend fun TelegramBot.send( /** * Will execute [sendMessageDraft] request + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chat]. */ public suspend fun TelegramBot.send( chat: Chat, draftId: DraftId, separator: TextSource? = null, - threadId: MessageThreadId? = chat.id.threadId, + directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null, builderBody: EntitiesBuilderBody @@ -2573,7 +2580,7 @@ public suspend fun TelegramBot.send( chat = chat, draftId = draftId, separator = separator, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop, builderBody = builderBody @@ -2581,12 +2588,13 @@ public suspend fun TelegramBot.send( /** * Will execute [sendMessageDraft] request + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chat]. */ public suspend fun TelegramBot.send( chat: Chat, draftId: DraftId, separator: String, - threadId: MessageThreadId? = chat.id.threadId, + directMessageThreadId: DirectMessageThreadId? = chat.id.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null, builderBody: EntitiesBuilderBody @@ -2594,7 +2602,7 @@ public suspend fun TelegramBot.send( chat = chat, draftId = draftId, separator = separator, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop, builderBody = builderBody @@ -2602,20 +2610,21 @@ public suspend fun TelegramBot.send( /** * Will execute [sendRichMessageDraft] request - * @param chatId Numeric target chat identifier. Identifiers carrying a thread supply the default [threadId]. + * @param chatId Numeric target chat identifier. + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. */ public suspend fun TelegramBot.send( chatId: IdChatIdentifier, draftId: Long, richMessage: InputRichMessage, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ): Unit = sendRichMessageDraft( chatId = chatId, draftId = draftId, richMessage = richMessage, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) diff --git a/tgbotapi.api/src/commonTest/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessageDraftTest.kt b/tgbotapi.api/src/commonTest/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessageDraftTest.kt new file mode 100644 index 0000000000..803b3d27e1 --- /dev/null +++ b/tgbotapi.api/src/commonTest/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendMessageDraftTest.kt @@ -0,0 +1,87 @@ +package dev.inmo.tgbotapi.extensions.api.send + +import dev.inmo.tgbotapi.bot.RequestsExecutor +import dev.inmo.tgbotapi.requests.abstracts.Request +import dev.inmo.tgbotapi.requests.send.SendMessageDraft +import dev.inmo.tgbotapi.types.ChatIdWithChannelDirectMessageThreadId +import dev.inmo.tgbotapi.types.DirectMessageThreadId +import dev.inmo.tgbotapi.types.DraftId +import dev.inmo.tgbotapi.types.IdChatIdentifier +import dev.inmo.tgbotapi.types.RawChatId +import kotlin.coroutines.Continuation +import kotlin.coroutines.EmptyCoroutineContext +import kotlin.coroutines.startCoroutine +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertIs +import kotlin.test.assertSame + +class SendMessageDraftTest { + private object RequestCaptured : Throwable() + + private class CapturingBot : RequestsExecutor { + lateinit var request: Request<*> + + override suspend fun execute(request: Request): T { + this.request = request + throw RequestCaptured + } + + override fun close() = Unit + } + + private fun CapturingBot.capture(block: suspend CapturingBot.() -> Unit): Request<*> { + var completion: Result? = null + block.startCoroutine( + this, + object : Continuation { + override val context = EmptyCoroutineContext + + override fun resumeWith(result: Result) { + completion = result + } + } + ) + + val completed = completion ?: error("Request coroutine did not complete synchronously") + assertSame(RequestCaptured, completed.exceptionOrNull()) + return request + } + + @Test + fun directExtensionForwardsDirectMessageThreadId() { + val chatId: IdChatIdentifier = ChatIdWithChannelDirectMessageThreadId( + RawChatId(1L), + DirectMessageThreadId(2L) + ) + val request = assertIs( + CapturingBot().capture { + sendMessageDraft( + chatId, + DraftId(3L), + "direct", + directMessageThreadId = DirectMessageThreadId(7L) + ) + } + ) + + assertEquals(chatId, request.chatId) + assertEquals(DirectMessageThreadId(7L), request.directMessageThreadId) + } + + @Test + fun genericExtensionForwardsDirectMessageThreadId() { + val chatId: IdChatIdentifier = ChatIdWithChannelDirectMessageThreadId( + RawChatId(4L), + DirectMessageThreadId(5L) + ) + val request = assertIs( + CapturingBot().capture { + send(chatId, DraftId(6L), "generic") + } + ) + + assertEquals(chatId, request.chatId) + assertEquals(DirectMessageThreadId(5L), request.directMessageThreadId) + } +} diff --git a/tgbotapi.api/src/commonTest/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraftTest.kt b/tgbotapi.api/src/commonTest/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraftTest.kt index 71eba3c201..fdcbef1b96 100644 --- a/tgbotapi.api/src/commonTest/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraftTest.kt +++ b/tgbotapi.api/src/commonTest/kotlin/dev/inmo/tgbotapi/extensions/api/send/SendRichMessageDraftTest.kt @@ -3,9 +3,9 @@ package dev.inmo.tgbotapi.extensions.api.send import dev.inmo.tgbotapi.bot.RequestsExecutor import dev.inmo.tgbotapi.requests.abstracts.Request import dev.inmo.tgbotapi.requests.send.SendRichMessageDraft -import dev.inmo.tgbotapi.types.ChatIdWithThreadId +import dev.inmo.tgbotapi.types.ChatIdWithChannelDirectMessageThreadId +import dev.inmo.tgbotapi.types.DirectMessageThreadId import dev.inmo.tgbotapi.types.IdChatIdentifier -import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.RawChatId import dev.inmo.tgbotapi.types.rich.InputRichMessageHTML import kotlin.coroutines.Continuation @@ -50,20 +50,25 @@ class SendRichMessageDraftTest { @Test fun directExtensionAcceptsIdChatIdentifier() { - val chatId: IdChatIdentifier = ChatIdWithThreadId(RawChatId(1L), MessageThreadId(2L)) + val chatId: IdChatIdentifier = ChatIdWithChannelDirectMessageThreadId(RawChatId(1L), DirectMessageThreadId(2L)) val request = assertIs( CapturingBot().capture { - sendRichMessageDraft(chatId, 3L, InputRichMessageHTML("direct")) + sendRichMessageDraft( + chatId, + 3L, + InputRichMessageHTML("direct"), + directMessageThreadId = DirectMessageThreadId(7L) + ) } ) assertEquals(chatId, request.chatId) - assertEquals(MessageThreadId(2L), request.threadId) + assertEquals(DirectMessageThreadId(7L), request.directMessageThreadId) } @Test fun genericExtensionAcceptsIdChatIdentifier() { - val chatId: IdChatIdentifier = ChatIdWithThreadId(RawChatId(4L), MessageThreadId(5L)) + val chatId: IdChatIdentifier = ChatIdWithChannelDirectMessageThreadId(RawChatId(4L), DirectMessageThreadId(5L)) val request = assertIs( CapturingBot().capture { send(chatId, 6L, InputRichMessageHTML("generic")) @@ -71,6 +76,6 @@ class SendRichMessageDraftTest { ) assertEquals(chatId, request.chatId) - assertEquals(MessageThreadId(5L), request.threadId) + assertEquals(DirectMessageThreadId(5L), request.directMessageThreadId) } } diff --git a/tgbotapi.core/api/tgbotapi.core.api b/tgbotapi.core/api/tgbotapi.core.api index c04bc657d6..0b00a56a01 100644 --- a/tgbotapi.core/api/tgbotapi.core.api +++ b/tgbotapi.core/api/tgbotapi.core.api @@ -6951,20 +6951,21 @@ public final class dev/inmo/tgbotapi/requests/send/SendLocationKt { public static synthetic fun SendStaticLocation-bYfvUCQ$default (Ldev/inmo/tgbotapi/types/ChatIdentifier;DDLdev/inmo/tgbotapi/types/MessageThreadId;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/String;Ldev/inmo/tgbotapi/types/EphemeralMessageParameters;ZZZLjava/lang/String;Ldev/inmo/tgbotapi/types/message/SuggestedPostParameters;Ldev/inmo/tgbotapi/types/ReplyParameters;Ldev/inmo/tgbotapi/types/buttons/KeyboardMarkup;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/send/SendLocation$Static; } -public final class dev/inmo/tgbotapi/requests/send/SendMessageDraft : dev/inmo/tgbotapi/abstracts/TextedOutput, dev/inmo/tgbotapi/requests/send/abstracts/OptionallyMessageThreadRequest, dev/inmo/tgbotapi/requests/send/abstracts/SendChatMessageRequest { +public final class dev/inmo/tgbotapi/requests/send/SendMessageDraft : dev/inmo/tgbotapi/abstracts/TextedOutput, dev/inmo/tgbotapi/requests/send/abstracts/OptionallyDirectMessageThreadRequest, dev/inmo/tgbotapi/requests/send/abstracts/SendChatMessageRequest { public static final field Companion Ldev/inmo/tgbotapi/requests/send/SendMessageDraft$Companion; - public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ljava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/IdChatIdentifier; public final fun component2-12UPeIw ()J public final fun component3 ()Ljava/lang/String; public final fun component4 ()Ldev/inmo/tgbotapi/types/message/ParseMode; - public final fun component6-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId; + public final fun component6-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId; public final fun component7 ()Ljava/lang/Boolean; public final fun component8 ()Ljava/lang/Boolean; public fun equals (Ljava/lang/Object;)Z public final fun getCanStop ()Ljava/lang/Boolean; public synthetic fun getChatId ()Ldev/inmo/tgbotapi/types/ChatIdentifier; public fun getChatId ()Ldev/inmo/tgbotapi/types/IdChatIdentifier; + public fun getDirectMessageThreadId-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId; public final fun getDraftId-12UPeIw ()J public fun getEntities ()Ljava/util/List; public final fun getKeepOnStop ()Ljava/lang/Boolean; @@ -6973,7 +6974,6 @@ public final class dev/inmo/tgbotapi/requests/send/SendMessageDraft : dev/inmo/t public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; public fun getText ()Ljava/lang/String; public fun getTextSources ()Ljava/util/List; - public fun getThreadId-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId; public fun hashCode ()I public fun method ()Ljava/lang/String; public fun toString ()Ljava/lang/String; @@ -6995,10 +6995,10 @@ public final class dev/inmo/tgbotapi/requests/send/SendMessageDraft$Companion { } public final class dev/inmo/tgbotapi/requests/send/SendMessageDraftKt { - public static final fun SendMessageDraft-89UPcpI (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;)Ldev/inmo/tgbotapi/requests/send/SendMessageDraft; - public static synthetic fun SendMessageDraft-89UPcpI$default (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/send/SendMessageDraft; - public static final fun SendMessageDraft-pJUp6k4 (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;)Ldev/inmo/tgbotapi/requests/send/SendMessageDraft; - public static synthetic fun SendMessageDraft-pJUp6k4$default (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/send/SendMessageDraft; + public static final fun SendMessageDraft-XkbMyLA (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;)Ldev/inmo/tgbotapi/requests/send/SendMessageDraft; + public static synthetic fun SendMessageDraft-XkbMyLA$default (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/lang/String;Ldev/inmo/tgbotapi/types/message/ParseMode;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/send/SendMessageDraft; + public static final fun SendMessageDraft-rrT3ZwM (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;)Ldev/inmo/tgbotapi/requests/send/SendMessageDraft; + public static synthetic fun SendMessageDraft-rrT3ZwM$default (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLjava/util/List;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/send/SendMessageDraft; } public final class dev/inmo/tgbotapi/requests/send/SendMessageKt { @@ -7070,25 +7070,25 @@ public final class dev/inmo/tgbotapi/requests/send/SendRichMessage$Companion { public final class dev/inmo/tgbotapi/requests/send/SendRichMessageDraft : dev/inmo/tgbotapi/requests/abstracts/SimpleRequest { public static final field Companion Ldev/inmo/tgbotapi/requests/send/SendRichMessageDraft$Companion; - public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ldev/inmo/tgbotapi/types/IdChatIdentifier; public final fun component2 ()J public final fun component3 ()Ldev/inmo/tgbotapi/types/rich/InputRichMessage; - public final fun component4-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId; + public final fun component4-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId; public final fun component5 ()Ljava/lang/Boolean; public final fun component6 ()Ljava/lang/Boolean; - public final fun copy-GAvqYPo (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;)Ldev/inmo/tgbotapi/requests/send/SendRichMessageDraft; - public static synthetic fun copy-GAvqYPo$default (Ldev/inmo/tgbotapi/requests/send/SendRichMessageDraft;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/MessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/send/SendRichMessageDraft; + public final fun copy--nslZuo (Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;)Ldev/inmo/tgbotapi/requests/send/SendRichMessageDraft; + public static synthetic fun copy--nslZuo$default (Ldev/inmo/tgbotapi/requests/send/SendRichMessageDraft;Ldev/inmo/tgbotapi/types/IdChatIdentifier;JLdev/inmo/tgbotapi/types/rich/InputRichMessage;Ldev/inmo/tgbotapi/types/DirectMessageThreadId;Ljava/lang/Boolean;Ljava/lang/Boolean;ILjava/lang/Object;)Ldev/inmo/tgbotapi/requests/send/SendRichMessageDraft; public fun equals (Ljava/lang/Object;)Z public final fun getCanStop ()Ljava/lang/Boolean; public final fun getChatId ()Ldev/inmo/tgbotapi/types/IdChatIdentifier; + public final fun getDirectMessageThreadId-1osv_qQ ()Ldev/inmo/tgbotapi/types/DirectMessageThreadId; public final fun getDraftId ()J public final fun getKeepOnStop ()Ljava/lang/Boolean; public fun getRequestSerializer ()Lkotlinx/serialization/SerializationStrategy; public fun getResultDeserializer ()Lkotlinx/serialization/DeserializationStrategy; public final fun getRichMessage ()Ldev/inmo/tgbotapi/types/rich/InputRichMessage; - public final fun getThreadId-S3HF-10 ()Ldev/inmo/tgbotapi/types/MessageThreadId; public fun hashCode ()I public fun method ()Ljava/lang/String; public fun toString ()Ljava/lang/String; diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessageDraft.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessageDraft.kt index 1220e13c14..ec35f9b1bb 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessageDraft.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendMessageDraft.kt @@ -9,23 +9,23 @@ import dev.inmo.tgbotapi.types.message.ParseMode import dev.inmo.tgbotapi.types.message.parseModeField import dev.inmo.tgbotapi.types.message.* import dev.inmo.tgbotapi.types.message.RawMessageEntity -import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage -import dev.inmo.tgbotapi.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass -import dev.inmo.tgbotapi.types.message.content.TextContent import dev.inmo.tgbotapi.types.message.toRawMessageEntities import dev.inmo.tgbotapi.utils.DefaultKTgBotAPIKSLog import dev.inmo.tgbotapi.utils.extensions.makeString import dev.inmo.tgbotapi.utils.serializers.UnitFromBooleanSerializer -import dev.inmo.tgbotapi.utils.throwRangeError import kotlinx.serialization.* -import kotlinx.serialization.builtins.serializer +/** + * Creates a plain-text draft for a direct messages topic. + * + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ fun SendMessageDraft( chatId: IdChatIdentifier, draftId: DraftId, text: String, parseMode: ParseMode? = null, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ) = SendMessageDraft( @@ -34,16 +34,21 @@ fun SendMessageDraft( text = text, parseMode = parseMode, rawEntities = null, - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) +/** + * Creates an entity-formatted draft for a direct messages topic. + * + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ fun SendMessageDraft( chatId: IdChatIdentifier, draftId: DraftId, entities: TextSourcesList, - threadId: MessageThreadId? = chatId.threadId, + directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, canStop: Boolean? = null, keepOnStop: Boolean? = null ) = SendMessageDraft( @@ -52,11 +57,16 @@ fun SendMessageDraft( text = entities.makeString(), parseMode = null, rawEntities = entities.toRawMessageEntities(), - threadId = threadId, + directMessageThreadId = directMessageThreadId, canStop = canStop, keepOnStop = keepOnStop ) +/** + * Streams a partial text message draft to a direct messages topic. + * + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. + */ @ConsistentCopyVisibility @Serializable data class SendMessageDraft internal constructor( @@ -71,16 +81,16 @@ data class SendMessageDraft internal constructor( @SerialName(entitiesField) private val rawEntities: List? = null, @OptIn(ExperimentalSerializationApi::class) - @SerialName(messageThreadIdField) + @SerialName(directMessagesTopicIdField) @EncodeDefault - override val threadId: MessageThreadId? = chatId.threadId, + override val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, @SerialName(canStopField) val canStop: Boolean? = null, @SerialName(keepOnStopField) val keepOnStop: Boolean? = null ) : SendChatMessageRequest, TextedOutput, - OptionallyMessageThreadRequest + OptionallyDirectMessageThreadRequest { override val textSources: TextSourcesList? by lazy { rawEntities ?.asTextSources(text) diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendRichMessageDraft.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendRichMessageDraft.kt index c71f9de950..5c5ebab797 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendRichMessageDraft.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/requests/send/SendRichMessageDraft.kt @@ -1,13 +1,13 @@ package dev.inmo.tgbotapi.requests.send import dev.inmo.tgbotapi.requests.abstracts.SimpleRequest +import dev.inmo.tgbotapi.types.DirectMessageThreadId import dev.inmo.tgbotapi.types.IdChatIdentifier -import dev.inmo.tgbotapi.types.MessageThreadId import dev.inmo.tgbotapi.types.canStopField import dev.inmo.tgbotapi.types.chatIdField +import dev.inmo.tgbotapi.types.directMessagesTopicIdField import dev.inmo.tgbotapi.types.draftIdField import dev.inmo.tgbotapi.types.keepOnStopField -import dev.inmo.tgbotapi.types.messageThreadIdField import dev.inmo.tgbotapi.types.richMessageField import dev.inmo.tgbotapi.types.rich.InputRichMessage import dev.inmo.tgbotapi.types.rich.multipartFiles @@ -22,7 +22,8 @@ import kotlinx.serialization.SerializationStrategy * ephemeral and acts as a temporary 30-second preview - once the output is finalized, [SendRichMessage] must be called * with the complete message to persist it in the user's chat. * - * @param chatId Numeric target chat identifier. Identifiers carrying a thread supply the default [threadId]. + * @param chatId Numeric target chat identifier. + * @param directMessageThreadId Direct messages topic identifier. Defaults from [chatId]. * @see sendRichMessageDraft */ @Serializable @@ -36,8 +37,8 @@ data class SendRichMessageDraft( val draftId: Long, @SerialName(richMessageField) val richMessage: InputRichMessage, - @SerialName(messageThreadIdField) - val threadId: MessageThreadId? = chatId.threadId, + @SerialName(directMessagesTopicIdField) + val directMessageThreadId: DirectMessageThreadId? = chatId.directMessageThreadId, @SerialName(canStopField) val canStop: Boolean? = null, @SerialName(keepOnStopField) diff --git a/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/GeneralBotApi103Test.kt b/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/GeneralBotApi103Test.kt index 14554ff4a2..be0086c11d 100644 --- a/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/GeneralBotApi103Test.kt +++ b/tgbotapi.core/src/commonTest/kotlin/dev/inmo/tgbotapi/types/GeneralBotApi103Test.kt @@ -38,15 +38,23 @@ class GeneralBotApi103Test { } @Test - fun `rich draft accepts thread-bearing chat identifiers`() { - val chatId = ChatIdWithThreadId(RawChatId(3L), MessageThreadId(4L)) + fun `drafts accept direct-message-thread chat identifiers`() { + val chatId = ChatIdWithChannelDirectMessageThreadId(RawChatId(3L), DirectMessageThreadId(4L)) + val messageDraft = SendMessageDraft(chatId, DraftId(5L), "draft") val richDraft = SendRichMessageDraft(chatId, 5L, InputRichMessageHTML("draft")) + val messageDraftJson = json.encodeToJsonElement(SendMessageDraft.serializer(), messageDraft).jsonObject val richDraftJson = json.encodeToJsonElement(SendRichMessageDraft.serializer(), richDraft).jsonObject + assertEquals(chatId, messageDraft.chatId) assertEquals(chatId, richDraft.chatId) - assertEquals(MessageThreadId(4L), richDraft.threadId) + assertEquals(DirectMessageThreadId(4L), messageDraft.directMessageThreadId) + assertEquals(DirectMessageThreadId(4L), richDraft.directMessageThreadId) + assertEquals("3", messageDraftJson[chatIdField].toString()) assertEquals("3", richDraftJson[chatIdField].toString()) - assertEquals("4", richDraftJson[messageThreadIdField].toString()) + assertEquals("4", messageDraftJson[directMessagesTopicIdField].toString()) + assertEquals("4", richDraftJson[directMessagesTopicIdField].toString()) + assertEquals(null, messageDraftJson[messageThreadIdField]) + assertEquals(null, richDraftJson[messageThreadIdField]) } @Test