mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
renamed event
This commit is contained in:
@@ -318,6 +318,6 @@ var db = require('./database'),
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
emitter.on('newpost', Categories.onNewPostMade);
|
emitter.on('event:newpost', Categories.onNewPostMade);
|
||||||
|
|
||||||
}(exports));
|
}(exports));
|
||||||
@@ -69,7 +69,7 @@ var db = require('./database'),
|
|||||||
|
|
||||||
db.incrObjectField('global', 'postCount');
|
db.incrObjectField('global', 'postCount');
|
||||||
|
|
||||||
emitter.emit('newpost', postData);
|
emitter.emit('event:newpost', postData);
|
||||||
|
|
||||||
plugins.fireHook('filter:post.get', postData, next);
|
plugins.fireHook('filter:post.get', postData, next);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1022,7 +1022,7 @@ var async = require('async'),
|
|||||||
Topics.addPostToTopic(postData.tid, postData.pid, postData.timestamp);
|
Topics.addPostToTopic(postData.tid, postData.pid, postData.timestamp);
|
||||||
};
|
};
|
||||||
|
|
||||||
emitter.on('newpost', Topics.onNewPostMade);
|
emitter.on('event:newpost', Topics.onNewPostMade);
|
||||||
|
|
||||||
Topics.addPostToTopic = function(tid, pid, timestamp, callback) {
|
Topics.addPostToTopic = function(tid, pid, timestamp, callback) {
|
||||||
db.sortedSetAdd('tid:' + tid + ':posts', timestamp, pid, callback);
|
db.sortedSetAdd('tid:' + tid + ':posts', timestamp, pid, callback);
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ var bcrypt = require('bcryptjs'),
|
|||||||
User.setUserField(postData.uid, 'lastposttime', postData.timestamp);
|
User.setUserField(postData.uid, 'lastposttime', postData.timestamp);
|
||||||
};
|
};
|
||||||
|
|
||||||
emitter.on('newpost', User.onNewPostMade);
|
emitter.on('event:newpost', User.onNewPostMade);
|
||||||
|
|
||||||
User.addPostIdToUser = function(uid, pid, timestamp) {
|
User.addPostIdToUser = function(uid, pid, timestamp) {
|
||||||
db.sortedSetAdd('uid:' + uid + ':posts', timestamp, pid);
|
db.sortedSetAdd('uid:' + uid + ':posts', timestamp, pid);
|
||||||
|
|||||||
Reference in New Issue
Block a user