2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-29 13:27:44 +00:00

src/telegram: Add request options in getFileStream (#771)

Here it's request unable to use proxy options
This commit is contained in:
pyg 2020-05-12 12:09:17 +08:00 committed by GitHub
parent 1ca5e2b967
commit b4309cf45a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1551,7 +1551,7 @@ class TelegramBot extends EventEmitter {
fileStream.emit('info', { fileStream.emit('info', {
uri: fileURI, uri: fileURI,
}); });
pump(streamedRequest({ uri: fileURI }), fileStream); pump(streamedRequest(Object.assign({ uri: fileURI }, this.options.request)), fileStream);
}) })
.catch((error) => { .catch((error) => {
fileStream.emit('error', error); fileStream.emit('error', error);