Skip to content

Commit

Permalink
version 0.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
temaivanoff committed Apr 12, 2019
1 parent cca7ccf commit 0101b0c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ function telegram_message({ from, text }) {
const user = checkUser(from.id);
if (user) {
plugin.debug(`msg -> id:${from.id}, text:${text}`);
telegram.sendText(from.id, `Received: ${text}`);
plugin.setChannelsData([{ id: 'incoming_message', value: text, ext: { update: Date.now()} }])
// telegram.sendText(from.id, `Received: ${text}`);
} else {
telegram_user_not_found(from.id)
}
Expand All @@ -61,7 +62,9 @@ function telegram_debug(text) {
}

function start(options) {
plugin.debug("version: 0.0.9");
plugin.debug("version: 0.0.11");

plugin.setChannels([{ id: 'incoming_message', desc: 'incoming_message' }]);

telegram = new Telegram({ token: options.token, proxy: options.proxy === 'manual' ? options.HTTPProxy : options.proxy });
telegram.on('debug', telegram_debug);
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.9",
"version": "0.0.11",
"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.10"
"version":"0.0.11"
}
6 changes: 5 additions & 1 deletion telegram.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@
"val": "127.0.0.1:8123"
}
],
"genrules": {},
"genrules": {
"incoming_message": {
"type": 200
}
},
"commands": [
{"id":"send_all","name":"Send all","reload":true,"noclose":false}
]
Expand Down

0 comments on commit 0101b0c

Please sign in to comment.