improvements in rich messages

This commit is contained in:
InsanusMokrassar committed 2026-08-17 23:30:37 +06:00
1 parent 8bee8982bb
commit 5755724569
10 files changed
+337 -35

No files matched your search

+2
View File
@@ -7,6 +7,7 @@
**Breaking changes**:
* `RichBlockTableCell.align` now uses the string-serialized `RichBlockTableCellAlign` sealed hierarchy (`Left`, `Center`, or `Right`) instead of `String`
* `RichBlockTableCell.valign` now uses the string-serialized `RichBlockTableCellVAlign` sealed hierarchy (`Top`, `Middle`, or `Bottom`) instead of `String`
* `RichBlockTableCell` is now a sealed interface with `Header` and `Regular` implementations; the input table DSL uses `headerCell` and `cell` respectively
* `InputRichBlockListItem` is now a sealed interface with `Ordered` and `Unordered` implementations; ordered items require a non-null `value` and typed `LabelType`, while `LabelType.Decimals` is the default; `InputRichBlocksBuilder` now exposes separate `orderedList` and `unorderedList` DSL functions with matching item builders
* `ReplyParameters` is now a sealed interface with nested `ReplyParameters.Chat` and `ReplyParameters.Ephemeral` implementations; overloaded `ReplyParameters(...)` companion factories construct both regular-message and ephemeral-message variants
@@ -16,6 +17,7 @@
**Migration advice**: Keep `ReplyParameters(...)` for both chat-message and ephemeral-message targets; explicit `ReplyParameters.Ephemeral(...)` subtype construction also remains available; pass `receiverUser`/`ephemeralMessageId` explicitly (or rely on their `null` default) when constructing the 4 group-family message implementations positionally
* `Core`:
* (`Rich Messages`) Added the raw-string-serialized `RichBlockTableCellVAlign` hierarchy and migrated table-cell vertical alignment from `String` to `RichBlockTableCellVAlign`
* (`Rich Messages`) Added the raw-string-serialized `RichBlockTableCellAlign` hierarchy and migrated table-cell alignment from `String` to `RichBlockTableCellAlign`
* (`Rich Messages`) Split `RichBlockTableCell` into header/regular variants with a shared flat surrogate serializer; added `headerCell` to the input table DSL
* (`Rich Messages`) Added `h1` through `h6` shortcuts for plain and rich-text headings in `InputRichBlocksBuilder`