diff options
author | Chocobozzz <me@florianbigard.com> | 2020-11-20 11:21:08 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-11-20 11:21:08 +0100 |
commit | de94ac86a211dec657332d964693857ec235ce40 (patch) | |
tree | 3bff96a40e7c862d83561a26249992b07331b0a2 /server/lib/video-comment.ts | |
parent | 3fba4b6bce69247b1d37f923894d8f44818a891c (diff) | |
download | PeerTube-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.ts | 6 |
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' | |||
5 | import { ResultList } from '../../shared/models' | 5 | import { ResultList } from '../../shared/models' |
6 | import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model' | 6 | import { VideoCommentThreadTree } from '../../shared/models/videos/video-comment.model' |
7 | import { VideoCommentModel } from '../models/video/video-comment' | 7 | import { VideoCommentModel } from '../models/video/video-comment' |
8 | import { MAccountDefault, MComment, MCommentOwnerVideoReply, MVideoFullLight, MCommentOwnerVideo } from '../types/models' | 8 | import { MAccountDefault, MComment, MCommentOwnerVideo, MCommentOwnerVideoReply, MVideoFullLight } from '../types/models' |
9 | import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send' | 9 | import { sendCreateVideoComment, sendDeleteVideoComment } from './activitypub/send' |
10 | import { getVideoCommentActivityPubUrl } from './activitypub/url' | 10 | import { getLocalVideoCommentActivityPubUrl } from './activitypub/url' |
11 | import { Hooks } from './plugins/hooks' | 11 | import { Hooks } from './plugins/hooks' |
12 | 12 | ||
13 | async function removeComment (videoCommentInstance: MCommentOwnerVideo) { | 13 | async 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 |