api: implement bot api 6.9

v3.3
Nikita 2 months ago committed by demget
parent 4670ccf5a3
commit df250e64a2

@ -36,6 +36,10 @@ type Rights struct {
CanSendVideoNotes bool `json:"can_send_video_notes"`
CanSendVoiceNotes bool `json:"can_send_voice_notes"`
CanPostStories bool `json:"can_post_stories"`
CanEditStories bool `json:"can_edit_stories"`
CanDeleteStories bool `json:"can_delete_stories"`
// Independent defines whether the chat permissions are set independently.
// If not, the can_send_other_messages and can_add_web_page_previews permissions
// will imply the can_send_messages, can_send_audios, can_send_documents, can_send_photos,
@ -106,6 +110,9 @@ func AdminRights() Rights {
CanSendVideos: true,
CanSendVideoNotes: true,
CanSendVoiceNotes: true,
CanPostStories: true,
CanEditStories: true,
CanDeleteStories: true,
}
}

@ -40,6 +40,9 @@ func TestEmbedRights(t *testing.T) {
"can_send_videos": true,
"can_send_video_notes": true,
"can_send_voice_notes": true,
"can_post_stories": false,
"can_edit_stories": false,
"can_delete_stories": false,
}
assert.Equal(t, expected, params)
}

@ -20,5 +20,7 @@ type WebAppData struct {
// WebAppAccessAllowed represents a service message about a user allowing
// a bot to write messages after adding the bot to the attachment menu or launching a Web App from a link.
type WriteAccessAllowed struct {
WebAppName string `json:"web_app_name,omitempty"`
WebAppName string `json:"web_app_name,omitempty"`
FromRequest bool `json:"from_request,omitempty"`
FromAttachmentMenu bool `json:"from_attachment_menu,omitempty"`
}

Loading…
Cancel
Save