diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2019-12-27 17:02:34 +0100 |
---|---|---|
committer | Rigel Kent <sendmemail@rigelk.eu> | 2019-12-27 17:02:44 +0100 |
commit | c1125bcadc1fa129856e56dc62f4c472cffa736a (patch) | |
tree | e6873bf7a306bfe809809f099d2d465dae3407b0 /server/models/video/video-comment.ts | |
parent | 6f79be110d31f4f751b989fe36b9de0d0f259fe0 (diff) | |
download | PeerTube-c1125bcadc1fa129856e56dc62f4c472cffa736a.tar.gz PeerTube-c1125bcadc1fa129856e56dc62f4c472cffa736a.tar.zst PeerTube-c1125bcadc1fa129856e56dc62f4c472cffa736a.zip |
Add comment filtering by reply count
Diffstat (limited to 'server/models/video/video-comment.ts')
-rw-r--r-- | server/models/video/video-comment.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index 869a42afe..28f011b03 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -6,7 +6,7 @@ import { isActivityPubUrlValid } from '../../helpers/custom-validators/activityp | |||
6 | import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants' | 6 | import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants' |
7 | import { AccountModel } from '../account/account' | 7 | import { AccountModel } from '../account/account' |
8 | import { ActorModel } from '../activitypub/actor' | 8 | import { ActorModel } from '../activitypub/actor' |
9 | import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getSort, throwIfNotValid } from '../utils' | 9 | import { buildBlockedAccountSQL, buildLocalAccountIdsIn, getCommentSort, throwIfNotValid } from '../utils' |
10 | import { VideoModel } from './video' | 10 | import { VideoModel } from './video' |
11 | import { VideoChannelModel } from './video-channel' | 11 | import { VideoChannelModel } from './video-channel' |
12 | import { getServerActor } from '../../helpers/utils' | 12 | import { getServerActor } from '../../helpers/utils' |
@@ -259,7 +259,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> { | |||
259 | const query = { | 259 | const query = { |
260 | offset: start, | 260 | offset: start, |
261 | limit: count, | 261 | limit: count, |
262 | order: getSort(sort), | 262 | order: getCommentSort(sort), |
263 | where: { | 263 | where: { |
264 | videoId, | 264 | videoId, |
265 | inReplyToCommentId: null, | 265 | inReplyToCommentId: null, |