Skip to content

Commit

Permalink
Update dependencies for good measure.
Browse files Browse the repository at this point in the history
Requires bugfiix jpmonette/feed#145 in feed, replace local patch once released.
  • Loading branch information
cwalther committed Mar 6, 2021
1 parent 9cb1fe0 commit c8a0430
Show file tree
Hide file tree
Showing 3 changed files with 541 additions and 5 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var config = JSON.parse(fs.readFileSync(process.argv[2]));

var slack = new WebClient(config.token);

var Feed = require('feed');
var Feed = require('feed').Feed;

// caches the result from a channel list request to avoid asynchronous lookups when title-less channels are mentioned in message texts
var channelsByIdCache = {};
Expand Down Expand Up @@ -168,7 +168,7 @@ function sendChannelFeed(req, res, count, info, messages, team, users) {
});
for (var i of items) feed.addItem(i);

res.type('application/atom+xml').send(feed.render('atom-1.0'));
res.type('application/atom+xml').send(feed.atom1());
}

function channelItem(channel, usersById, team, feedUrl) {
Expand Down Expand Up @@ -289,7 +289,7 @@ app.get('/channels.xml', (req, res) => {
});
for (var i of items) feed.addItem(i);

res.type('application/atom+xml').send(feed.render('atom-1.0'));
res.type('application/atom+xml').send(feed.atom1());
})
.catch(e => {
res.status(500).send(e.toString() + '\n' + e.stack);
Expand Down
Loading

0 comments on commit c8a0430

Please sign in to comment.