Skip to content

Commit

Permalink
version 0.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
temaivanoff committed Oct 2, 2018
1 parent 93ad019 commit 6383a0a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function telegram_debug(text) {
}

function start(options) {
plugin.debug("version: 0.0.7");
plugin.debug("version: 0.0.8");

telegram = new Telegram({ token: options.token, proxy: options.proxy === 'manual' ? options.HTTPProxy : options.proxy });
telegram.on('debug', telegram_debug);
Expand Down
3 changes: 2 additions & 1 deletion lib/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class Telegram extends EventEmitter {
if (this.params.poll_error === this.options.proxyError) {
this.emit('debug', 'polling: stop');
clearInterval(this.params.poll_timer);
this.params.poll_error = 0;
this.start();
}
}
Expand All @@ -171,7 +172,7 @@ class Telegram extends EventEmitter {
this.getProxy(host => {
if (host !== null) {
this.emit('debug', `proxy: ${host}`);
this.params.proxy = `http://${'213.239.209.51:3128' || host}`;
this.params.proxy = `http://${host}`;
this.pollingStart();
} else {
this.emit('debug', 'proxy: not found');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "plugin-telegram",
"version": "0.0.7",
"version": "0.0.8",
"description": "",
"private": true,
"main": "index.js",
Expand Down
2 changes: 1 addition & 1 deletion telegram.ih
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"activation": false,
"resources": false,
"cross": true,
"version":"0.0.7"
"version":"0.0.8"
}
4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const child = require('child_process');
const modulepath = './index.js';

const unitid = 'plugin_telegram'
const unitid = 'telegram'

const params = {
token: '578902439:AAHQudZo296l17lMfpLu1GE-4e8mKLxCM4A',
token: '',
proxy: 'auto',
}

Expand Down

0 comments on commit 6383a0a

Please sign in to comment.