Skip to content

Node.js based forum software built for the modern web

fixed socket notifications for new posts

psychobunny9e23279459d3
diff --git a/src/posts.js b/src/posts.js
index 4c729361b1..c437f57bc1 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -116,8 +116,8 @@ var RDB = require('./redis.js'),
user.getUserFields(uid, ['username','reputation','picture'], function(data){
var timestamp = new Date().getTime();
-
- socket.in('topic_' + tid).emit('event:new_post', {
+
+ io.sockets.in('topic_' + tid).emit('event:new_post', {
'posts' : [
{
'pid' : pid,