added back feeds, removed duplicate post var in feed

v1.18.x
Baris Usakli 11 years ago
parent a87ebb64d8
commit 168052bf45

@ -42,7 +42,6 @@
author: topicData.posts[0].username,
ttl: Feed.defaults.ttl
}),
topic_posts = topicData.posts.concat(topicData.posts),
dateStamp;
// Add pubDate if topic contains posts
@ -50,7 +49,7 @@
feed.pubDate = new Date(parseInt(topicData.posts[0].timestamp, 10)).toUTCString();
}
async.each(topic_posts, function(postData, next) {
async.each(topicData.posts, function(postData, next) {
if (postData.deleted === '0') {
dateStamp = new Date(parseInt(postData.edited === '0' ? postData.timestamp : postData.edited, 10)).toUTCString();

@ -85,8 +85,8 @@ var RDB = require('./redis'),
var cid = topicData.cid;
//feed.updateTopic(tid);
//feed.updateRecent();
feed.updateTopic(tid);
feed.updateRecent();
RDB.zadd('categories:recent_posts:cid:' + cid, timestamp, pid);

Loading…
Cancel
Save