Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract annonymoustype as postsFields #37

Merged
merged 6 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ dist/
yarn.lock
npm-debug.log

node_modules/*
!node_modules/nodebb-plugin-composer-default
sftp-config.json
config.json
jsconfig.json
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/topics/teaser.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = function (Topics) {
});

const [allPostData, callerSettings] = await Promise.all([
posts.getPostsFields(teaserPids, ['pid', 'uid', 'timestamp', 'tid', 'content']),
posts.getPostsFields(teaserPids, ['pid', 'uid', 'timestamp', 'tid', 'content', 'annonymousType']),
user.getSettings(uid),
]);
let postData = allPostData.filter(post => post && post.pid);
Expand Down Expand Up @@ -142,7 +142,7 @@ module.exports = function (Topics) {
const mainPid = await Topics.getTopicField(postData.tid, 'mainPid');
pids = [mainPid];
}
const prevPosts = await posts.getPostsFields(pids, ['pid', 'uid', 'timestamp', 'tid', 'content']);
const prevPosts = await posts.getPostsFields(pids, ['pid', 'uid', 'timestamp', 'tid', 'content', 'annonymousType']);
isBlocked = prevPosts.every(checkBlocked);
start += postsPerIteration;
stop = start + postsPerIteration - 1;
Expand Down
Loading