diff --git a/models/forms/makepost.js b/models/forms/makepost.js index a13f7787..1b3b8880 100644 --- a/models/forms/makepost.js +++ b/models/forms/makepost.js @@ -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 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 - Socketio.emitRoom('globalmanage-recent-hashed', 'newPost', { ...projectedPost, ip: { cloak, raw: null } }); - Socketio.emitRoom(`${res.locals.board._id}-manage-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, type } }); if (!dontStoreRawIps) { //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(`${res.locals.board._id}-manage-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, type } }); } //now add other pages to be built in background