Skip to content

Node.js based forum software built for the modern web

feat: add post to hook params

Barış Soner Uşaklıf07b4484cffa
diff --git a/src/socket.io/helpers.js b/src/socket.io/helpers.js
index ad3ea3a87f..4dd3a31dd4 100644
--- a/src/socket.io/helpers.js
+++ b/src/socket.io/helpers.js
@@ -40,7 +40,12 @@ async function notifyUids(uid, uids, type, result) {
uids = filterTidCidIgnorers(watchStateUids, watchStates);
uids = await user.blocks.filterUids(uid, uids);
uids = await user.blocks.filterUids(post.topic.uid, uids);
- const data = await plugins.hooks.fire('filter:sockets.sendNewPostToUids', { uidsTo: uids, uidFrom: uid, type: type });
+ const data = await plugins.hooks.fire('filter:sockets.sendNewPostToUids', {
+ uidsTo: uids,
+ uidFrom: uid,
+ type: type,
+ post: post,
+ });
post.ip = undefined;