mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-05 05:18:23 +02:00
fixed anon images in topic view, anon users arent added to active users for a category
This commit is contained in:
@@ -425,7 +425,8 @@ var RDB = require('./redis.js'),
|
||||
};
|
||||
|
||||
Categories.addActiveUser = function(cid, uid) {
|
||||
RDB.sadd('cid:' + cid + ':active_users', uid);
|
||||
if(parseInt(uid, 10))
|
||||
RDB.sadd('cid:' + cid + ':active_users', uid);
|
||||
};
|
||||
|
||||
Categories.removeActiveUser = function(cid, uid) {
|
||||
|
||||
@@ -336,7 +336,7 @@ var RDB = require('./redis.js'),
|
||||
topicData.badgeclass = (topicInfo.hasread && current_user != 0) ? '' : 'badge-important';
|
||||
topicData.teaser_text = topicInfo.teaserInfo.text || '',
|
||||
topicData.teaser_username = topicInfo.teaserInfo.username || '';
|
||||
topicData.teaser_userpicture = topicInfo.teaserInfo.picture || '';
|
||||
topicData.teaser_userpicture = topicInfo.teaserInfo.picture || require('gravatar').url('', {}, https = nconf.get('https'));
|
||||
topicData.teaser_pid = topicInfo.teaserInfo.pid;
|
||||
|
||||
topicData.teaser_timestamp = topicInfo.teaserInfo.timestamp ? (new Date(parseInt(topicInfo.teaserInfo.timestamp, 10)).toISOString()) : '';
|
||||
|
||||
Reference in New Issue
Block a user