mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
fixing issue where NodeBB hangs if a non-existant topic was requested
This commit is contained in:
@@ -6,6 +6,13 @@ var RDB = require('./redis.js'),
|
||||
notifications = require('./notifications.js');
|
||||
|
||||
(function(ThreadTools) {
|
||||
|
||||
ThreadTools.exists = function(tid, callback) {
|
||||
RDB.sismember('topics:tid', tid, function(err, ismember) {
|
||||
if (err) RDB.handle(err);
|
||||
callback(!!ismember || false);
|
||||
});
|
||||
}
|
||||
|
||||
ThreadTools.privileges = function(tid, uid, callback) {
|
||||
//todo: break early if one condition is true
|
||||
|
||||
Reference in New Issue
Block a user