Fix tree comment rendering
authorChocobozzz <me@florianbigard.com>
Fri, 12 Jan 2018 10:59:52 +0000 (11:59 +0100)
committerChocobozzz <me@florianbigard.com>
Fri, 12 Jan 2018 10:59:52 +0000 (11:59 +0100)
Sort by updatedAt too

server/models/video/video-comment.ts

index fffa4bb57d060848bc929beb396f52ad2dcfbefa..c10d7c7c8c17f0ef73fb89f577e051d7f12de411 100644 (file)
@@ -253,7 +253,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
 
   static listThreadCommentsForApi (videoId: number, threadId: number) {
     const query = {
-      order: [ [ 'createdAt', 'ASC' ] ],
+      order: [ [ 'createdAt', 'ASC' ], [ 'updatedAt', 'ASC' ] ],
       where: {
         videoId,
         [ Sequelize.Op.or ]: [