[go: up one dir, main page]

Skip to content

Commit

Permalink
Merge branch 'hotfix/0.11.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
meinside committed Aug 1, 2024
2 parents f717b05 + 698711b commit 9d0930c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
16 changes: 14 additions & 2 deletions methods_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -1775,11 +1775,17 @@ func (o OptionsCreateChatInviteLink) SetCreatesJoinRequest(createsJoinRequest bo

// OptionsPinChatMessage struct for PinChatMessage
//
// options include: `disable_notification`
// options include: `business_connection_id`, and `disable_notification`
//
// https://core.telegram.org/bots/api#pinchatmessage
type OptionsPinChatMessage MethodOptions

// SetBusinessConnectionID sets the `business_connection_id` value of OptionsPinChatMessage.
func (o OptionsPinChatMessage) SetBusinessConnectionID(businessConnectionID string) OptionsPinChatMessage {
o["business_connection_id"] = businessConnectionID
return o
}

// SetDisableNotification sets the `disable_notification` value of OptionsPinChatMessage.
func (o OptionsPinChatMessage) SetDisableNotification(disable bool) OptionsPinChatMessage {
o["disable_notification"] = disable
Expand All @@ -1788,11 +1794,17 @@ func (o OptionsPinChatMessage) SetDisableNotification(disable bool) OptionsPinCh

// OptionsUnpinChatMessage struct for UnpinChatMessage
//
// options include: `message_id`
// options include: `business_connection_id`, and `message_id`
//
// https://core.telegram.org/bots/api#unpinchatmessage
type OptionsUnpinChatMessage MethodOptions

// SetBusinessConnectionID sets the `business_connection_id` value of OptionsUnpinChatMessage.
func (o OptionsUnpinChatMessage) SetBusinessConnectionID(businessConnectionID string) OptionsUnpinChatMessage {
o["business_connection_id"] = businessConnectionID
return o
}

// SetMessageID set the `message_id` value of OptionsUnpinChatMessage.
func (o OptionsUnpinChatMessage) SetMessageID(messageID int64) OptionsUnpinChatMessage {
o["message_id"] = messageID
Expand Down
1 change: 1 addition & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ type User struct {
CanReadAllGroupMessages *bool `json:"can_read_all_group_messages,omitempty"` // returned only in GetMe()
SupportsInlineQueries *bool `json:"supports_inline_queries,omitempty"` // returned only in GetMe()
CanConnectToBusiness *bool `json:"can_connect_to_business,omitempty"` // returned only in GetMe()
HasMainWebApp *bool `json:"has_main_web_app,omitempty"` // returned only in GetMe()
}

// Chat is a struct of a chat
Expand Down

0 comments on commit 9d0930c

Please sign in to comment.