REPOSITORY / ScuroNeko/Laniakea

Releases

RELEASES REPOSITORY
  • v2.0.0 RC 1
    Golang lint / lint (push) Failing after 1m37s
    Pre-Release

    ScuroNeko released this 2026-09-08 23:21:38 +03:00 | 6 commits to dev since this release

    v2.0.0-rc.1 (2026-09-08)

    Added

    • Added Bot API 10.3 rich buttons: RichMessageButton, RichTextButton, RichBlockButtons, and InputRichBlockButtons, including inline-query chat selection, login, clipboard, and disabled actions. Empty inline queries are preserved through pointer fields; RichMessageButtonStyleLink supports borderless callback buttons.
    • Added incoming and outgoing expandable block quotations and document blocks, with tgrich.Button, Buttons, ButtonsWithAlign, ExpandableBlockquote, ExpandableBlockquoteWithCredit, Document, and DocumentWithCaption helpers.
    • Added compact rich tables through IsCompact and RichTable.SetCompact, including JSON decoding and HTML rendering.
    • Added rich-button validation for a single action, permitted label entities and styles, callback byte limits, copy-text length, row size, and alignment. Invalid values return ErrRichInvalidButton from tgrich builders.
    • Added HTML rendering for rich buttons, expandable quotations, and documents. Document media is collected into InputRichMessage.Media with tg://document?id= references and supports multipart attachments through the existing rich-message uploader.
    • Added EphemeralMessageParameters, including ReplaceCallbackQueryMessage, to JSON and multipart send parameters for text, rich messages, animation, audio, documents, live photos, photos, stickers, video, video notes, voice, contacts, locations, and venues. Ephemeral media editing now supports multipart attachments through Uploader.EditEphemeralMessageMedia.
    • Added RichMessage to EditEphemeralMessageText and ShowCaptionAboveMedia to EditEphemeralMessageCaption.
    • Added CanStop and KeepOnStop to message and rich-message draft parameters. Stopped-generation updates are decoded as UpdateTypeMessageGenerationStopped and expose their chat through normalized message context.
    • Added disabled inline buttons and SetDisabled, plus ForceReply support on specialized inline and reply keyboard markup.
    • Added CommunityChatJoined service messages; UniqueGiftInfo.Text, Entities, and IsPrivate; and CanSendWelcomeMessages to administrator members, rights, and promotion parameters.
    • Added RichTextUnknown and RichBlockUnknown to preserve unrecognized Telegram rich objects without losing fields.
    • Added explicit InlineKeyboard.SetUnlimitedRows configuration.

    Breaking changes

    • Changed the Go module and import path to git.scuroneko.dev/scuroneko/laniakea/v2, raised the minimum Go version to 1.27, and removed the v1-only retraction directive.
    • PollAnswer.User and VoterChat are now pointers; removed VoterUser and VoterChatInfo. Update-context normalization and tests use the pointer fields.
    • RunnerFn and NewRunner now require callbacks with context.Context; removed ContextRunnerFn and NewContextRunner.
    • InlineKeyboard.Get now validates and returns (*tgapi.ReplyMarkup, error); removed GetValidated and keyboard-level Validate. Message-context helpers reject invalid keyboards before sending or editing. Previously built rows exceeding a subsequently lowered row limit now fail final validation.
    • CallbackData.Encode now returns (string, error) and validates encoding and payload length; removed EncodeValidated.
    • Moved custom request execution from TelegramRequest.Do / DoWithContext to API.Do / DoWithContext, and from UploaderRequest methods to the corresponding Uploader methods.
    • Renamed ChatFullInfo.AvailableReaction to AvailableReactions, ReplyParameters.QuoteParsingMode to QuoteParseMode, and InputChecklist.OtherCanAddTasks / OtherCanMarkTasksAsDone to OthersCanAddTasks / OthersCanMarkTasksAsDone; JSON keys remain unchanged.
    • Removed DeleteAllMessageReactionWithContext; use DeleteAllMessageReactionsWithContext.
    • The JSON and multipart send parameter structs listed above replace top-level ReceiverUserID and CallbackQueryID with EphemeralMessageParameters.
    • UnmarshalRichMessage now requires a non-null blocks array. Unknown rich objects use lossless raw wrappers instead of lossy text wrappers or errors.
    • Removed the unbounded API.GetFileByLink and GetFileByLinkWithContext; use GetFileByLinkLimit* with an explicit byte limit or OpenFileByLink* for streaming.
    • Non-positive inline-keyboard row limits are invalid by default; call SetUnlimitedRows to disable automatic wrapping explicitly.

    Changed

    • Prepared the declared version and user-agent metadata for v2.0.0-rc.1.
    • Updated English and Russian README runner and keyboard examples for the final v2 contracts, and generalized the prerelease policy for the v2 RC cycle.

    Fixed

    • Fixed nested rich-text validation skipping children of formatting and link entities, which could bypass text-size and nesting limits.

    Tests

    • Migrated runner, poll-voter, keyboard, message-context, and wire-format tests to the new contracts.
    • Added rich-button action round trips, malformed-input and nesting cases, row and callback boundaries, HTML escaping, compact tables, expandable quotations, document media, multipart attachments, draft-upload coverage, Bot API 10.3 wire fields, stopped-generation routing, strict root parsing, lossless unknown objects, bounded downloads, explicit unlimited rows, and compile-focused v1-to-v2 migration coverage.

    What's Changed

    Full Changelog: v1.2.0...v2.0.0-rc.1

    Downloads