diff options
author | Chocobozzz <me@florianbigard.com> | 2019-05-31 15:14:40 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-05-31 15:17:04 +0200 |
commit | ee79b60e4e500a1dc7db8bcee560d9a4a1a5d17a (patch) | |
tree | d18b7f8667ee41923c89744586c1b71b8691f4a2 /server/helpers/custom-validators/activitypub/video-comments.ts | |
parent | 57cfff78858b2360d9e038e2a504b761cb51da47 (diff) | |
download | PeerTube-ee79b60e4e500a1dc7db8bcee560d9a4a1a5d17a.tar.gz PeerTube-ee79b60e4e500a1dc7db8bcee560d9a4a1a5d17a.tar.zst PeerTube-ee79b60e4e500a1dc7db8bcee560d9a4a1a5d17a.zip |
More robust federation
In particular when fetching pleroma outbox
Diffstat (limited to 'server/helpers/custom-validators/activitypub/video-comments.ts')
-rw-r--r-- | server/helpers/custom-validators/activitypub/video-comments.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/activitypub/video-comments.ts b/server/helpers/custom-validators/activitypub/video-comments.ts index 26c8c4cc6..e04c5388f 100644 --- a/server/helpers/custom-validators/activitypub/video-comments.ts +++ b/server/helpers/custom-validators/activitypub/video-comments.ts | |||
@@ -36,7 +36,8 @@ function normalizeComment (comment: any) { | |||
36 | if (!comment) return | 36 | if (!comment) return |
37 | 37 | ||
38 | if (typeof comment.url !== 'string') { | 38 | if (typeof comment.url !== 'string') { |
39 | comment.url = comment.url.href || comment.url.url | 39 | if (typeof comment.url === 'object') comment.url = comment.url.href || comment.url.url |
40 | else comment.url = comment.id | ||
40 | } | 41 | } |
41 | 42 | ||
42 | return | 43 | return |