2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-09-05 00:35:21 +00:00

src/telegram: Emit 'info' on stream from TelegramBot#getFileStream()

This commit is contained in:
GochoMugo
2017-12-08 19:25:56 +03:00
parent b968e893d3
commit 04e8b892aa
4 changed files with 32 additions and 5 deletions

View File

@@ -30,6 +30,13 @@ exports = module.exports = {
* @return {Promise}
*/
isPollingMockServer,
/**
* Return true if the string is a URI to a file
* on Telegram servers.
* @param {String} uri
* @return {Boolean}
*/
isTelegramFileURI,
/**
* Send a message to the webhook at the specified port and path.
* @param {Number} port
@@ -217,3 +224,8 @@ function handleRatelimit(bot, methodName, suite) {
};
return bot;
}
function isTelegramFileURI(uri) {
return /https?:\/\/.*\/file\/bot.*\/.*/.test(uri);
}