freifunk-bot

Modular parser for the hackerspace door status with handlers for multiple services
git clone git://archive.git.mtrnord.blog/MTRNord/freifunk-bot.git
Log | Files | Refs | README | LICENSE

commit 60862975c8738882a2b4ca924e5d7163734ffa9d
parent 4e3b16fa0c05dd21167f4ed82cae59c6192b9bdc
Author: Marcel <MTRNord@users.noreply.github.com>
Date:   Fri,  2 Jun 2017 14:53:02 +0200

Update telegram.js
Diffstat:
Mhandlers/telegram.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/handlers/telegram.js b/handlers/telegram.js @@ -27,7 +27,7 @@ module.exports = { if (err) {throw new Error(err);} var communities = obj _.find(communities.communities, function (key) { - var ccode = key["ccode"]; + var ccode = key; if (ccode.toLowerCase() === resp.toLowerCase()) { getNodes.countNodes(resp.toLowerCase(), "telegram", fromId, msg, "", bot, botan) } @@ -46,7 +46,7 @@ module.exports = { if (err) {throw new Error(err);} var communities = obj _.find(communities.communities, function (key) { - var ccode = key["ccode"]; + var ccode = key; if (ccode.toLowerCase() === args[0].toLowerCase()) { getNodes.NodeInfo(args[0].toLowerCase(), args[1].toLowerCase(), "telegram", fromId, msg, "", bot, botan) } @@ -64,7 +64,7 @@ module.exports = { var communities = obj var communities_list = "" _.find(communities.communities, function (key) { - var ccode = key["ccode"] + var ccode = key var name = key["name"] communities_list = communities_list + name + ": " + ccode + "\n" });