diff options
-rw-r--r-- | index.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/index.js b/index.js index 68facd4..d7f2f33 100644 --- a/index.js +++ b/index.js @@ -52,8 +52,19 @@ var M = new mastodon({ var boosted = {}; function boost(rows) { - console.log('Boosting the following:'); - console.dir(rows); + rows.map(function(row) { + return row.id; + }) + .filter(function(id) { + return !boosted[id]; + }) + .forEach(function(id) { + M.post(`/api/vi/statuses/${id}/reblog`, function(err, result) { + console.log(`boosted status #${id}`); + console.log('error:', err); + console.log('result:', result); + }); + }) } cycle(); |