mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 12:36:02 +01:00
added timestamp to teaser, continuing work on recent replies block
This commit is contained in:
@@ -180,7 +180,8 @@ var RDB = require('./redis.js'),
|
||||
'pin-icon': pinned[i] === '1' ? 'icon-pushpin' : 'none',
|
||||
'badgeclass' : (hasReadTopics[i] && current_user !=0) ? '' : 'badge-important',
|
||||
'teaser_text': teaserInfo[i].text,
|
||||
'teaser_username': teaserInfo[i].username
|
||||
'teaser_username': teaserInfo[i].username,
|
||||
'teaser_timestamp': utils.relativeTime(teaserInfo[i].timestamp)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -260,8 +261,10 @@ var RDB = require('./redis.js'),
|
||||
}
|
||||
|
||||
Categories.getRecentReplies = function(cid, callback) {
|
||||
RDB.zrange('categories:recent_posts:cid:' + cid, 0, -1, function(err, replies) {
|
||||
callback(replies);
|
||||
RDB.zrange('categories:recent_posts:cid:' + cid, 0, -1, function(err, pids) {
|
||||
posts.getPostSummaryByPids(pids, function(posts) {
|
||||
callback(posts);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user