Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,12 @@ type Message struct {
//
// optional
ReplyMarkup *InlineKeyboardMarkup `json:"reply_markup,omitempty"`
// WriteAccessAllowed the user allowed the bot to write messages after adding it
//to the attachment or side menu, launching a Web App from a link,
//or accepting an explicit request from a Web App sent by the method requestWriteAccess
//
// optional
WriteAccessAllowed *WriteAccessAllowed `json:"write_access_allowed,omitempty"`
}

// Time converts the message timestamp into a Time.
Expand Down Expand Up @@ -814,6 +820,18 @@ func (e MessageEntity) IsTextLink() bool {
return e.Type == "text_link"
}

// WriteAccessAllowed this object represents a service message about a user allowing a
// bot to write messages after adding it to the attachment menu, launching a Web App from a link,
// or accepting an explicit request from a Web App sent by the method requestWriteAccess.
type WriteAccessAllowed struct {
// optional
FromRequest bool `json:"from_request,omitempty"`
// optional
WebAppName string `json:"web_app_name,omitempty"`
// optional
FromAttachmentMenu bool `json:"from_attachment_menu,omitempty"`
}

// PhotoSize represents one size of a photo or a file / sticker thumbnail.
type PhotoSize struct {
// FileID identifier for this file, which can be used to download or reuse
Expand Down