refactor: generate a topic id when asserting a new topic

This commit is contained in:
Julian Lam
2024-01-19 11:31:04 -05:00
parent 981b4f146d
commit 2ff70fdde2
9 changed files with 39 additions and 34 deletions

View File

@@ -61,6 +61,7 @@ function modifyPost(post, fields) {
if (activitypub.helpers.isUri(post.pid)) {
intFields.splice(intFields.indexOf('pid'), 1);
intFields.splice(intFields.indexOf('uid'), 1);
intFields.splice(intFields.indexOf('tid'), 1);
}
db.parseIntFields(post, intFields, fields);
if (post.hasOwnProperty('upvotes') && post.hasOwnProperty('downvotes')) {