]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-comment.ts
Add ability to share playlists in modal
[github/Chocobozzz/PeerTube.git] / server / models / video / video-comment.ts
index fa4d13c3b63f497a3c73fb94aa269c15399b6b31..1d5c7280df284b3cbccf32ba7dad3bacb919ea71 100644 (file)
@@ -44,7 +44,7 @@ import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIf
 import { VideoModel } from './video'
 import { VideoChannelModel } from './video-channel'
 
-enum ScopeNames {
+export enum ScopeNames {
   WITH_ACCOUNT = 'WITH_ACCOUNT',
   WITH_ACCOUNT_FOR_API = 'WITH_ACCOUNT_FOR_API',
   WITH_IN_REPLY_TO = 'WITH_IN_REPLY_TO',
@@ -655,7 +655,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
       id: this.id,
       url: this.url,
       text: this.text,
-      threadId: this.originCommentId || this.id,
+      threadId: this.getThreadId(),
       inReplyToCommentId: this.inReplyToCommentId || null,
       videoId: this.videoId,
       createdAt: this.createdAt,