mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
recent page gets alerts when new topics and posts are created
This commit is contained in:
@@ -207,8 +207,7 @@ marked.setOptions({
|
||||
user.getUserFields(uid, ['username','reputation','picture','signature'], function(data) {
|
||||
|
||||
var timestamp = Date.now();
|
||||
|
||||
io.sockets.in('topic_' + tid).emit('event:new_post', {
|
||||
var socketData = {
|
||||
'posts' : [
|
||||
{
|
||||
'pid' : pid,
|
||||
@@ -226,7 +225,11 @@ marked.setOptions({
|
||||
'editor': '',
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
|
||||
io.sockets.in('topic_' + tid).emit('event:new_post', socketData);
|
||||
io.sockets.in('recent_posts').emit('event:new_post', socketData);
|
||||
|
||||
});
|
||||
} else {
|
||||
socket.emit('event:alert', {
|
||||
|
||||
Reference in New Issue
Block a user