Fix callback message, attachment payload tokens, and video response mapping, Issue/chat permission#32
Open
sereginsk wants to merge 5 commits intoNanoAgents:mainfrom
Open
Fix callback message, attachment payload tokens, and video response mapping, Issue/chat permission#32sereginsk wants to merge 5 commits intoNanoAgents:mainfrom
sereginsk wants to merge 5 commits intoNanoAgents:mainfrom
Conversation
added 5 commits
April 29, 2026 13:11
Move callback message access to CallbackQueryUpdate.Message and mark CallbackQuery.Message obsolete so consumers can reliably read source message mid after deserialization.
Handle MAX payload-style media attachments so image/audio/video/file tokens are mapped to FileId and preserved by consumers that persist attachment tokens.
Prevent deserialization failures of Chats API responses when MAX returns short permission strings (e.g. view_stats, edit, delete).
…разбирается из attachments[].payload.vcf_info/max_info/hash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
контракты Max.Bot под актуальный формат MAX Bot API.
Callback / message_callback
Добавлено Message? Message { get; set; } в CallbackQueryUpdate.
В Update.CallbackQueryUpdate теперь пробрасывается Message = Update.Message, чтобы mid исходного сообщения не терялся.
CallbackQuery.Message помечено как [Obsolete]
Attachments
AttachmentJsonConverter дополнен поддержкой вложенного формата payload для type="image" | "audio" | "video" | "file":
payload.token маппится в FileId
payload.url маппится в Url
для image поддержан payload.photo_id -> PhotoAttachment.Id
Videos
Video расширена актуальными полями ответа: token, urls, thumbnail.url.
chat permission enum
Добавлены/обновлены юнит-тесты для:
GetVideoAsync нового shape (token, urls, thumbnail)
десериализации attachments из payload-формата (photo_id/token/url, audio.payload.token/url и т.п.)