summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2014-03-17 00:59:57 +0100
committerlassulus <lassulus@googlemail.com>2014-03-17 00:59:57 +0100
commita1980d18e89cc8f8d6b2598df55a888429bb7f06 (patch)
treec9228cc467b3fc17447f3549342f1fb2b0ecb0e3
parent4474143648f2b16448b49bf748e20f783b35347a (diff)
newsbot.js: url_shortener dummy
-rw-r--r--news/newsbot.js8
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])