Move preparing of 'business_connection_id' field to BaseChatMessage struct
OvyFlash olegshva4ko@gmail.com
Fri, 09 Aug 2024 17:13:41 +0300
1 files changed,
5 insertions(+),
3 deletions(-)
jump to
M
helper_structs.go
→
helper_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 }