mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 09:06:15 +01:00
test: fix guest handles in onNewPost
This commit is contained in:
@@ -228,7 +228,7 @@ module.exports = function (Topics) {
|
|||||||
return postData;
|
return postData;
|
||||||
};
|
};
|
||||||
|
|
||||||
async function onNewPost({ pid, tid, uid: postOwner }, { uid }) {
|
async function onNewPost({ pid, tid, uid: postOwner }, { uid, handle }) {
|
||||||
const [[postData], [userInfo]] = await Promise.all([
|
const [[postData], [userInfo]] = await Promise.all([
|
||||||
posts.getPostSummaryByPids([pid], uid, {}),
|
posts.getPostSummaryByPids([pid], uid, {}),
|
||||||
posts.getUserInfoForPosts([postOwner], uid),
|
posts.getUserInfoForPosts([postOwner], uid),
|
||||||
@@ -248,7 +248,7 @@ module.exports = function (Topics) {
|
|||||||
postData.display_moderator_tools = true;
|
postData.display_moderator_tools = true;
|
||||||
postData.display_move_tools = true;
|
postData.display_move_tools = true;
|
||||||
postData.selfPost = false;
|
postData.selfPost = false;
|
||||||
|
posts.overrideGuestHandle(postData, handle);
|
||||||
return postData;
|
return postData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user