diff options
Diffstat (limited to 'news')
-rw-r--r-- | news/newsbot.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/news/newsbot.js b/news/newsbot.js index ba3dfde3..35587d39 100644 --- a/news/newsbot.js +++ b/news/newsbot.js @@ -140,7 +140,9 @@ function create_feedbot (nick, uri, channels) { // (i.e. we already have a lastTitle) if (client.lastTitle) { newitems.forEach(function (item) { - broadcast(item.title + ' ' + item.link) + return getShortLink(item.link, function (error, shortlink) { + return broadcast(item.title + ' ' + shortlink) + }) }) } @@ -178,6 +180,10 @@ function run_command (methodname, params, callback) { } } +function getShortLink (link, callback) { + return callback(null, link) +} + var methods = {} methods.add = function (params, callback) { create_feedbot(params[0], params[1], [news_channel]) |