From ccd097cb27435332a56f3fe385a5220ac2c34a58 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Wed, 21 Mar 2018 16:01:30 +0330 Subject: [PATCH 1/5] chore: bump to 3.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ee51d69..2ae337f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telegram-api", - "version": "3.0.0", + "version": "3.1.0", "description": "Control Telegram bots easily using the new Telegram API", "main": "build/index.js", "scripts": { -- 2.34.1 From 120698fcc05dccfbfd5ce9a388ec59e4e77be905 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Wed, 21 Mar 2018 16:02:23 +0330 Subject: [PATCH 2/5] chore: bump to 3.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2ae337f..d76630d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telegram-api", - "version": "3.1.0", + "version": "3.1.1", "description": "Control Telegram bots easily using the new Telegram API", "main": "build/index.js", "scripts": { -- 2.34.1 From 5c6c24d0a4bc5353edd435fc3242fe2ba79a88f8 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Wed, 21 Mar 2018 18:30:18 +0330 Subject: [PATCH 3/5] chore: bump to 4.0.0, sequential messages --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d76630d..d2a4541 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telegram-api", - "version": "3.1.1", + "version": "4.0.0", "description": "Control Telegram bots easily using the new Telegram API", "main": "build/index.js", "scripts": { -- 2.34.1 From a3980f3d222702d51d12dded0ff54113df84c183 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Wed, 21 Mar 2018 18:31:02 +0330 Subject: [PATCH 4/5] chore: remove unnecessary stuff --- README.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index 8cb92b8..6f696b6 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,7 @@ If you are cloning this repository, remember to run `npm install` to install dep If you are looking for a real-life example of a bot written using this module, see [mdibaiee/webdevrobot](https://github.com/mdibaiee/webdevrobot). -[Documentation](https://github.com/mdibaiee/node-telegram-api/wiki) -============== +[**Documentation**](https://github.com/mdibaiee/node-telegram-api/wiki) Example ======= @@ -52,12 +51,6 @@ bot.command('weather [date]', function(message) { }) ``` -Bots using this module -====================== - -[@webdevrobot](https://telegram.me/webdevrobot) => [mdibaiee/webdevrobot](https://github.com/mdibaiee/webdevrobot) -[@metagon_bot](https://telegram.me/metagon_bot) => [austinhuang0131/metagon](https://github.com/austinhuang0131/metagon) - Todo ==== - [x] Webhook support (not tested, see [#4](https://github.com/mdibaiee/node-telegram-api/issues/4)) -- 2.34.1 From abf965c0f20fdcba0dec31193217e165634bba95 Mon Sep 17 00:00:00 2001 From: Laurynas Karvelis Date: Fri, 20 Apr 2018 13:36:48 +0300 Subject: [PATCH 5/5] Don't add 'getUpdates' request to the queue as it's going to hinder 'send*' calls performance --- src/functions/api.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/functions/api.js b/src/functions/api.js index 9ee952d..4ca5ee4 100644 --- a/src/functions/api.js +++ b/src/functions/api.js @@ -65,6 +65,11 @@ const methods = ['getMe', 'sendMessage', 'forwardMessage', 'sendPhoto', methods.forEach(method => { API.prototype[method] = function (data) { //eslint-disable-line + if (method === 'getUpdates') { + // don't add 'getUpdates' request to the queue as it's going to hinder 'send*' calls performance + return this.request(method, data); + } + // implementation taken from https://github.com/yagop/node-telegram-bot-api/issues/192#issuecomment-249488807 return new Promise((resolve, reject) => { this._queue.push({ method, data, resolve, reject }); -- 2.34.1