Skip to content

Node.js based forum software built for the modern web

renamed event

barisusaklif83b7ee9720c
diff --git a/src/categories.js b/src/categories.js
index 46673d0873..368f293794 100644
--- a/src/categories.js
+++ b/src/categories.js
@@ -318,6 +318,6 @@ var db = require('./database'),
});
};
- emitter.on('newpost', Categories.onNewPostMade);
+ emitter.on('event:newpost', Categories.onNewPostMade);
}(exports));
\ No newline at end of file
diff --git a/src/posts.js b/src/posts.js
index ce28617cda..63572d5104 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -69,7 +69,7 @@ var db = require('./database'),
db.incrObjectField('global', 'postCount');
- emitter.emit('newpost', postData);
+ emitter.emit('event:newpost', postData);
plugins.fireHook('filter:post.get', postData, next);
},
diff --git a/src/topics.js b/src/topics.js
index f34a6dde94..58399d7344 100644
--- a/src/topics.js
+++ b/src/topics.js
@@ -1022,7 +1022,7 @@ var async = require('async'),
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) {
db.sortedSetAdd('tid:' + tid + ':posts', timestamp, pid, callback);
diff --git a/src/user.js b/src/user.js
index d0e32f4486..0d1c25c064 100644
--- a/src/user.js
+++ b/src/user.js
@@ -350,7 +350,7 @@ var bcrypt = require('bcryptjs'),
User.setUserField(postData.uid, 'lastposttime', postData.timestamp);
};
- emitter.on('newpost', User.onNewPostMade);
+ emitter.on('event:newpost', User.onNewPostMade);
User.addPostIdToUser = function(uid, pid, timestamp) {
db.sortedSetAdd('uid:' + uid + ':posts', timestamp, pid);