fix: send string to validator

This commit is contained in:
Julian Lam
2024-02-20 14:23:53 -05:00
parent 53d1c10ec4
commit 893dd523ca

View File

@@ -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);
}