Node.js based forum software built for the modern web
fix: #12496, url in schema
Julian Lamf78333862150
diff --git a/public/openapi/components/schemas/PostObject.yaml b/public/openapi/components/schemas/PostObject.yamlindex f6194dd75c..914ca40837 100644--- a/public/openapi/components/schemas/PostObject.yaml+++ b/public/openapi/components/schemas/PostObject.yaml@@ -11,6 +11,11 @@ PostObject:type: numberdescription: The post that this post is in reply tonullable: true+ url:+ type: string+ description: |+ A permalink to the post content.+ For posts received via ActivityPub, it is the url of the original piece of content.content:type: stringuid:diff --git a/src/posts/create.js b/src/posts/create.jsindex d38aec356e..2c23560266 100644--- a/src/posts/create.js+++ b/src/posts/create.js@@ -44,7 +44,7 @@ module.exports = function (Posts) {if (data.handle && !parseInt(uid, 10)) {postData.handle = data.handle;}- if (_activitypub.url) {+ if (_activitypub && _activitypub.url) {postData.url = _activitypub.url;}