1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2026-06-20 02:06:11 +00:00
Commit Graph

3576 Commits

Author SHA1 Message Date
df5018ecf5 Make ChatJoinRequestQueryResult inheritors data objects + serializable
- Approve/Decline/Queue are now data object
- each inheritor (and Unknown) annotated with the shared
  ChatJoinRequestQueryResult.Companion serializer
- companion PrimitiveSerialDescriptor serial name is "ChatJoinRequestQueryResult"

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 18:49:42 +06:00
0188c65319 Rework ChatJoinRequestQueryResult + EditChatMessageText nullable text
- ChatJoinRequestQueryResult: enum -> sealed interface (Approve/Decline/
  Queue objects + Unknown) with a companion KSerializer using a
  PrimitiveKind.STRING descriptor (encodeString/decodeString), not
  String.serializer()
- EditChatMessageText: text is now nullable per API; add EditChatMessageRichText
  factory for rich edits; widen EditTextChatMessage.text to String?

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 18:42:25 +06:00
c2b1a5d44b Add behaviour-builder coverage for receiving Rich Messages
- onRichMessage trigger (ContentTriggers)
- waitRichMessage / waitRichMessageMessage expectations
- Flow<ContentMessage<*>>.onlyRichMessageContentMessages() util

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 17:52:10 +06:00
6bdd217530 Add Bot API 10.1 Rich Messages support
Adds the full Rich Messages type system and methods:
- RichText hierarchy: RichTextPlain, RichTextGroup, RichTextEntity and all
  24 RichText* entity types, with a recursive serializer handling plain
  strings, arrays and typed objects
- RichBlock hierarchy: all 21 RichBlock* types plus RichBlockCaption,
  RichBlockTableCell and RichBlockListItem (JsonContentPolymorphic by type)
- RichMessage type and RichMessageContent message content; rich_message
  parsed in RawMessage; RichMessageContentMessage typealias
- InputRichMessage (internal constructor + InputRichMessageHTML /
  InputRichMessageMarkdown factories) and InputRichMessageContent usable as
  InputMessageContent
- SendRichMessage and SendRichMessageDraft requests with API bindings
- richMessage parameter on EditChatMessageText
- Serialization round-trip test for RichMessage/RichText/RichBlock

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 17:32:56 +06:00
f6d5b3ea71 Add Bot API 10.1 Join Request Queries support
Adds:
- ChatJoinRequestQueryId value class and ChatJoinRequest.queryId field
- ExtendedBot.supportsJoinRequestQueries (User.supports_join_request_queries)
- ExtendedChat.guardBot (ChatFullInfo.guard_bot), parsed for public chats
- AnswerChatJoinRequestQuery request + ChatJoinRequestQueryResult enum
- SendChatJoinRequestWebApp request
- answerChatJoinRequestQuery / sendChatJoinRequestWebApp TelegramBot extensions

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 17:03:26 +06:00
628e877064 Add Bot API 10.1 Polls support (Link, InputMediaLink)
Adds the Link type implementing PollMedia (the url attached to a poll
option), parses the new `link` field in PollMedia, and adds
TelegramMediaLink (InputMediaLink) usable as InputPollOptionMedia.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-19 16:53:59 +06:00
8ba13ea5fc start 35.0.0 2026-06-19 16:27:54 +06:00
b8e995f36d Merge pull request #1047 from InsanusMokrassar/34.0.0
34.0.0
2026-06-13 14:34:21 +06:00
fa73f34182 Merge branch 'master' into 34.0.0 v34.0.0 2026-06-13 14:08:47 +06:00
db0e839d2f Merge pull request #1049 from InsanusMokrassar/33.2.0
33.2.0
2026-06-13 13:54:56 +06:00
7b28c0f068 fill changelog v33.2.0 2026-06-13 13:54:35 +06:00
f4c50caf1e add supporting of telegram bots api note 2026-06-13 13:51:43 +06:00
7e45f84b78 small update of changelog 2026-06-13 00:24:55 +06:00
1603f4dae4 small note about migration 2026-06-06 13:17:01 +06:00
a9f27b4417 ksp + apiDump 2026-06-06 13:02:04 +06:00
b39b5f376e small improvement in message hierarchy 2026-05-30 18:56:27 +06:00
df77c65c86 rework of guest answers messages 2026-05-30 15:09:19 +06:00
1f2b3b9464 guest message answers rework 2026-05-30 12:49:54 +06:00
643133a87b add api exception (solution of #1048) + add classcasts for exceptions 2026-05-28 19:05:53 +06:00
cd56c7e257 rename functions names in NewRequestExceptionTests 2026-05-28 18:38:35 +06:00
03921092a4 Merge pull request #1042 from Dramex/fix/1008-too-many-requests-case-insensitive
Detect Too Many Requests case-insensitively (closes #1008)
2026-05-28 18:36:54 +06:00
4a09a6372e start 33.2.0 2026-05-28 18:25:55 +06:00
fdd21f3cbd fixes in guest mode 2026-05-23 00:02:16 +06:00
eacf01a158 api dump 2026-05-20 18:03:19 +06:00
dd35631345 fix checking of text length in SendMessageDraft 2026-05-20 17:59:46 +06:00
631a4f16bd implement 'others' changes 2026-05-19 23:25:15 +06:00
236939eab8 implement guest mode and make HUGE CHANGES IN MESSAGES HIERARCHY 2026-05-17 23:20:10 +06:00
d47641c39a add LivePhotos support 2026-05-17 16:43:18 +06:00
f3f28b6165 fixes of hierarchy and build 2026-05-17 14:53:49 +06:00
08d160cfa7 add Polls updates 2026-05-16 16:59:40 +06:00
3ed7c8c75f Chat Management section realization 2026-05-15 18:10:30 +06:00
7e1df37b87 start 34.0.0 2026-05-15 00:27:33 +06:00
97b7b3d5d7 Merge pull request #1043 from InsanusMokrassar/33.1.0
33.1.0
2026-04-19 13:26:44 +06:00
62b4bc15ca remove kotlinpoet from changelog v33.1.0 2026-04-19 12:58:27 +06:00
7c2ce53713 fix changelog style 2026-04-19 12:56:22 +06:00
035c8f469a update dependencies
dev.inmo:micro_utils 0.29.1 -> 0.29.2
dev.inmo:kslog 1.6.0 -> 1.6.1
com.squareup:kotlinpoet-ksp 2.2.0 -> 2.3.0
io.ktor:ktor-* 3.4.1 -> 3.4.2
org.jetbrains.kotlinx:kotlinx-serialization-* 1.10.0 -> 1.11.0
org.jetbrains.kotlin:kotlin-* 2.3.10 -> 2.3.20
2026-04-19 12:48:40 +06:00
c982eef85b start 33.1.0 2026-04-19 12:18:46 +06:00
emad
4500711db4 Detect Too Many Requests descriptions case-insensitively
Telegram has been observed to return both "Bad Request: Too Many
Requests: retry after N" and "Bad Request: too Many Requests: retry
after N" (lowercase leading 't'). The current case-sensitive check
silently misses the latter and the caller never sees a
TooMuchRequestsException.

Added `ignoreCase = true` to the contains(...) check and three
regression tests covering canonical, lowercase-initial, and
all-lowercase casings.

Closes #1008
2026-04-19 03:24:16 +03:00
16e94a1e1b Merge pull request #1038 from InsanusMokrassar/33.0.0
33.0.0
2026-04-16 17:43:38 +06:00
96a5508e9a refill changelog v33.0.0 2026-04-16 13:05:29 +06:00
83de9fd973 fix name of allowMultipleAnswers to allowsMultipleAnswers 2026-04-16 13:02:10 +06:00
4a0b890697 fill CHANGELOG.md, fix README.md, small fix in checkSendData to not throw error 2026-04-16 12:39:26 +06:00
0e481c3dd9 fix of custom emoji icons passing in setParams of WebApp and rewrite init errors to warnings in SendQuizPoll 2026-04-15 16:13:37 +06:00
176d0d419a fix hierarchy of ManagedBotUpdated 2026-04-14 19:59:52 +06:00
77bf7b6e89 fix of onManagedBotUpdated work 2026-04-14 19:50:54 +06:00
5337f8c7cc fix of username encoding in KeyboardButtonRequestManagedBot 2026-04-14 17:26:37 +06:00
57fa6fd597 add note about isAnonymous with allowAddingOptions 2026-04-13 15:45:25 +06:00
703538a6fa continue fix of fields absence 2026-04-13 14:49:48 +06:00
08877a8f47 continue fixing missing parts 2026-04-09 13:10:14 +06:00
8d3338b79a add support of pollOptionId in ReplyParameters and reply_to_poll_option_id 2026-04-08 19:02:25 +06:00