all repos — telegram-bot-api @ 6c12dc992508fd68332a6199afd1e999da9d92b8

Golang bindings for the Telegram Bot API

Merge pull request #32 from OvyFlash/bot-api-7.8

BotAPI 7.8 implementation
OvyFlash 46941696+OvyFlash@users.noreply.github.com
Fri, 09 Aug 2024 17:14:25 +0300
commit

6c12dc992508fd68332a6199afd1e999da9d92b8

parent

861b023805bcfc625de29435542767bab48b91b2

2 files changed, 12 insertions(+), 4 deletions(-)

jump to
M helper_structs.gohelper_structs.go

@@ -67,7 +67,6 @@ type BaseEdit struct {

BaseChatMessage InlineMessageID string ReplyMarkup *InlineKeyboardMarkup - BusinessConnectionID string } func (edit BaseEdit) params() (Params, error) {

@@ -84,7 +83,6 @@ params.Merge(p1)

} err := params.AddInterface("reply_markup", edit.ReplyMarkup) - params.AddNonEmpty("business_connection_id", edit.BusinessConnectionID) return params, err }

@@ -107,7 +105,8 @@

// BaseChatMessage is a base type for all messages in chats. type BaseChatMessage struct { ChatConfig - MessageID int + MessageID int + BusinessConnectionID BusinessConnectionID } func (base BaseChatMessage) params() (Params, error) {

@@ -115,9 +114,14 @@ params, err := base.ChatConfig.params()

if err != nil { return params, err } + p1, err := base.BusinessConnectionID.params() + if err != nil { + return params, err + } + params.Merge(p1) params.AddNonZero("message_id", base.MessageID) - return params, nil + return params, err } // BaseChatMessages is a base type for all messages in chats.
M types.gotypes.go

@@ -263,6 +263,10 @@ // Returned only in getMe.

// // optional CanConnectToBusiness bool `json:"can_connect_to_business,omitempty"` + // True, if the bot has a main Web App. Returned only in getMe. + // + // optional + HasMainWebApp bool `json:"has_main_web_app,omitempty"` } // String displays a simple text version of a user.