all repos — telegram-bot-api @ 540e6677ca820110738c5d162151adf3ffd287ab

Golang bindings for the Telegram Bot API

Move preparing of 'business_connection_id' field to BaseChatMessage struct
OvyFlash olegshva4ko@gmail.com
Fri, 09 Aug 2024 17:13:41 +0300
commit

540e6677ca820110738c5d162151adf3ffd287ab

parent

819ceaf793b123f21d7310964c3525660f21f225

1 files changed, 5 insertions(+), 3 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 }

@@ -116,8 +114,12 @@ 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) - err = params.AddInterface("business_connection_id", base.BusinessConnectionID) return params, err }