-
Notifications
You must be signed in to change notification settings - Fork 910
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for uploading multiple files #356
Conversation
Hello
|
Whoops, I forgot to mention that the panics needed to be removed still. I wasn't aware of |
waiting for that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, but what are we going to do about the breaking changes, since the versioning is really weird at the moment?
@@ -96,7 +95,7 @@ func buildParams(in Params) (out url.Values) { | |||
} | |||
|
|||
// MakeRequest makes a request to a specific endpoint with our token. | |||
func (bot *BotAPI) MakeRequest(endpoint string, params Params) (APIResponse, error) { | |||
func (bot *BotAPI) MakeRequest(endpoint string, params Params) (*APIResponse, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This smells like a breaking change to me. People running off of master or develop are going to have a bad time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Not really sure what else to do though, I want to keep consistency through everything and there's already a ton of breaking changes elsewhere so might as well do it now.
go-telegram-bot-api#356 updates the logic to support uploading multiple files but accidentally breaks this.
This allows for uploading multiple files for media groups or thumbnails. It also fixes a longstanding bug with using URLs.
There's a few breaking changes:
UploadFile
has been renamed toUploadFiles
, and now takes a[]RequestFile
instead offieldname
andfile
New*Upload
andNew*Share
have been condensed intoNew*
APIResponse
and errors are returned as pointersI'd love to get feedback on the API changes or what could be done to further improve things.