aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/video-comment.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-11-20 11:21:08 +0100
committerChocobozzz <me@florianbigard.com>2020-11-20 11:21:08 +0100
commitde94ac86a211dec657332d964693857ec235ce40 (patch)
tree3bff96a40e7c862d83561a26249992b07331b0a2 /server/lib/video-comment.ts
parent3fba4b6bce69247b1d37f923894d8f44818a891c (diff)
downloadPeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.gz
PeerTube-de94ac86a211dec657332d964693857ec235ce40.tar.zst
PeerTube-de94ac86a211dec657332d964693857ec235ce40.zip
Fix incorrect IDs in AP federation
Diffstat (limited to 'server/lib/video-comment.ts')
-rw-r--r--server/lib/video-comment.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/lib/video-comment.ts b/server/lib/video-comment.ts
index c92a7c43a..736ebb2f8 100644
--- a/server/lib/video-comment.ts
+++ b/server/lib/video-comment.ts
@@ -5,9 +5,9 @@ import { sequelizeTypescript } from '@server/initializers/database'
5import { ResultList } from '../../shared/models' 5import { ResultList } from '../../shared/models'
6import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model' 6import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model'
7import { VideoCommentModel } from '../models/video/video-comment' 7import { VideoCommentModel } from '../models/video/video-comment'
8import { MAccountDefault, MComment, MCommentOwnerVideoReply, MVideoFullLight, MCommentOwnerVideo } from '../types/models' 8import { MAccountDefault, MComment, MCommentOwnerVideo, MCommentOwnerVideoReply, MVideoFullLight } from '../types/models'
9import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send' 9import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send'
10import { getVideoCommentActivityPubUrl } from './activitypub/url' 10import { getLocalVideoCommentActivityPubUrl } from './activitypub/url'
11import { Hooks } from './plugins/hooks' 11import { Hooks } from './plugins/hooks'
12 12
13async function removeComment (videoCommentInstance: MCommentOwnerVideo) { 13async function removeComment (videoCommentInstance: MCommentOwnerVideo) {
@@ -51,7 +51,7 @@ async function createVideoComment (obj: {
51 url: new Date().toISOString() 51 url: new Date().toISOString()
52 }, { transaction: t, validate: false }) 52 }, { transaction: t, validate: false })
53 53
54 comment.url = getVideoCommentActivityPubUrl(obj.video, comment) 54 comment.url = getLocalVideoCommentActivityPubUrl(obj.video, comment)
55 55
56 const savedComment: MCommentOwnerVideoReply = await comment.save({ transaction: t }) 56 const savedComment: MCommentOwnerVideoReply = await comment.save({ transaction: t })
57 savedComment.InReplyToVideoComment = obj.inReplyToComment 57 savedComment.InReplyToVideoComment = obj.inReplyToComment