Skip to content

fix: resolve issues #242, #245, #261, #262 and support Bot API 9.5#263

Merged
negasus merged 3 commits intogo-telegram:mainfrom
TGlimmer:upstream-contrib
Mar 19, 2026
Merged

fix: resolve issues #242, #245, #261, #262 and support Bot API 9.5#263
negasus merged 3 commits intogo-telegram:mainfrom
TGlimmer:upstream-contrib

Conversation

@TGlimmer
Copy link
Contributor

@TGlimmer TGlimmer commented Mar 4, 2026

Summary

Breaking Changes

  • InlineKeyboardButton.SwitchInlineQuery: string*string
  • InlineKeyboardButton.SwitchInlineQueryCurrentChat: string*string
  • InlineKeyboardButton.CopyText: CopyTextButton*CopyTextButton
  • KeyboardButtonRequestUser.UserIsBot: bool*bool
  • KeyboardButtonRequestUser.UserIsPremium: bool*bool
  • KeyboardButton.RequestUser: *KeyboardButtonRequestUsers*KeyboardButtonRequestUser

Test plan

  • go build ./... passes
  • go vet ./... passes (only pre-existing warnings in chat_member.go)
  • go test ./... all tests pass

TGlimmer added 2 commits March 5, 2026 02:33
…go-telegram#262

- go-telegram#261: fix SetMyProfilePhoto missing `type` field by checking runtime
  concrete type behind interface fields in buildRequestForm
- go-telegram#245: change SwitchInlineQuery and SwitchInlineQueryCurrentChat to
  *string, and CopyText to *CopyTextButton, to properly handle empty
  string values and prevent zero-value struct leaking in JSON
- go-telegram#242: handle dual return type (Message or bool) for all Edit*/Stop*
  methods when editing inline messages
- go-telegram#262: fix KeyboardButton.RequestUser type from *KeyboardButtonRequestUsers
  to *KeyboardButtonRequestUser, and change UserIsBot/UserIsPremium to *bool
- Add setChatMemberTag method and SetChatMemberTagParams
- Add MessageEntity type "date_time" with unix_time and date_time_format fields
- Add tag field to ChatMemberMember and ChatMemberRestricted
- Add can_edit_tag to ChatMemberRestricted and ChatPermissions
- Add can_manage_tags to ChatMemberAdministrator, ChatAdministratorRights,
  and PromoteChatMemberParams
- Add sender_tag field to Message
…er struct tags

The ChatMemberMember struct contained Unicode right double quotation marks
(U+201D) instead of ASCII double quotes (U+0022) in JSON struct tags,
causing golangci-lint structtag check to fail. Also fixes smart quotes
in comments across ChatMember types for consistency.
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 36.36364% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.79%. Comparing base (9051686) to head (fc38efb).

Files with missing lines Patch % Lines
methods.go 50.00% 8 Missing and 3 partials ⚠️
build_request_form.go 9.09% 8 Missing and 2 partials ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #263      +/-   ##
==========================================
- Coverage   46.04%   45.79%   -0.26%     
==========================================
  Files          29       29              
  Lines        2126     2138      +12     
==========================================
  Hits          979      979              
- Misses       1098     1107       +9     
- Partials       49       52       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ruizlenato pushed a commit to ruizlenato/bot that referenced this pull request Mar 5, 2026
@negasus negasus merged commit d2e7c7d into go-telegram:main Mar 19, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants