]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/custom-validators/activitypub/video-comments.ts
More robust federation
[github/Chocobozzz/PeerTube.git] / server / helpers / custom-validators / activitypub / video-comments.ts
index 26c8c4cc6b5712bbea4b3c0aeaa262fee5878c68..e04c5388f9059bf5cfc7022fbbe0fe8cb302c786 100644 (file)
@@ -36,7 +36,8 @@ function normalizeComment (comment: any) {
   if (!comment) return
 
   if (typeof comment.url !== 'string') {
-    comment.url = comment.url.href || comment.url.url
+    if (typeof comment.url === 'object') comment.url = comment.url.href || comment.url.url
+    else comment.url = comment.id
   }
 
   return