Skip to content

Node.js based forum software built for the modern web

fix: send string to validator

Julian Lam893dd523ca07
diff --git a/src/posts/data.js b/src/posts/data.js
index cb0862e115..20f1df2991 100644
--- a/src/posts/data.js
+++ b/src/posts/data.js
@@ -64,8 +64,8 @@ function modifyPost(post, fields) {
if (post) {
['pid', 'uid', 'tid', 'toPid'].forEach((prop) => {
if (
- post.hasOwnProperty(prop) && post[prop] &&
- (activitypub.helpers.isUri(post[prop]) || validator.isUUID(post[prop]))
+ post.hasOwnProperty(prop) &&
+ (activitypub.helpers.isUri(post[prop]) || validator.isUUID(String(post[prop])))
) {
_intFields.splice(_intFields.indexOf(prop), 1);
}