|
|
@ -599,14 +599,14 @@ module.exports = async (req, res) => { |
|
|
|
//dont emit thread to this socket, because the room only exists when the thread is open
|
|
|
|
//dont emit thread to this socket, because the room only exists when the thread is open
|
|
|
|
Socketio.emitRoom(`${res.locals.board._id}-${data.thread}`, 'newPost', projectedPost); |
|
|
|
Socketio.emitRoom(`${res.locals.board._id}-${data.thread}`, 'newPost', projectedPost); |
|
|
|
} |
|
|
|
} |
|
|
|
const { raw, cloak } = data.ip; |
|
|
|
const { raw, cloak, type } = data.ip; |
|
|
|
//but emit it to manage pages because they need to get all posts through socket including thread
|
|
|
|
//but emit it to manage pages because they need to get all posts through socket including thread
|
|
|
|
Socketio.emitRoom('globalmanage-recent-hashed', 'newPost', { ...projectedPost, ip: { cloak, raw: null } }); |
|
|
|
Socketio.emitRoom('globalmanage-recent-hashed', 'newPost', { ...projectedPost, ip: { cloak, raw: null, type } }); |
|
|
|
Socketio.emitRoom(`${res.locals.board._id}-manage-recent-hashed`, 'newPost', { ...projectedPost, ip: { cloak, raw: null } }); |
|
|
|
Socketio.emitRoom(`${res.locals.board._id}-manage-recent-hashed`, 'newPost', { ...projectedPost, ip: { cloak, raw: null, type } }); |
|
|
|
if (!dontStoreRawIps) { |
|
|
|
if (!dontStoreRawIps) { |
|
|
|
//no need to emit to these rooms if raw IPs are not stored
|
|
|
|
//no need to emit to these rooms if raw IPs are not stored
|
|
|
|
Socketio.emitRoom('globalmanage-recent-raw', 'newPost', { ...projectedPost, ip: { cloak, raw } }); |
|
|
|
Socketio.emitRoom('globalmanage-recent-raw', 'newPost', { ...projectedPost, ip: { cloak, raw, type } }); |
|
|
|
Socketio.emitRoom(`${res.locals.board._id}-manage-recent-raw`, 'newPost', { ...projectedPost, ip: { cloak, raw } }); |
|
|
|
Socketio.emitRoom(`${res.locals.board._id}-manage-recent-raw`, 'newPost', { ...projectedPost, ip: { cloak, raw, type } }); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//now add other pages to be built in background
|
|
|
|
//now add other pages to be built in background
|
|
|
|