mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-07 06:25:50 +01:00
closes #1731
This commit is contained in:
@@ -395,6 +395,12 @@ var async = require('async'),
|
||||
});
|
||||
};
|
||||
|
||||
Topics.isOwner = function(tid, uid, callback) {
|
||||
Topics.getTopicField(tid, 'uid', function(err, author) {
|
||||
callback(err, parseInt(author, 10) === parseInt(uid, 10));
|
||||
});
|
||||
};
|
||||
|
||||
Topics.updateTimestamp = function(tid, timestamp) {
|
||||
db.sortedSetAdd('topics:recent', timestamp, tid);
|
||||
Topics.setTopicField(tid, 'lastposttime', timestamp);
|
||||
|
||||
Reference in New Issue
Block a user