]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/video/video-comment.ts
Add user adminFlags
[github/Chocobozzz/PeerTube.git] / server / models / video / video-comment.ts
index e733138c1369ece6a74c003321250ad292c898a5..cb5f1cbbe067d2d73d22d4cb28205eed3c6c83d5 100644 (file)
@@ -1,5 +1,4 @@
 import * as Sequelize from 'sequelize'
-import { Op } from 'sequelize'
 import {
   AllowNull,
   BeforeDestroy,
@@ -19,7 +18,7 @@ import { ActivityTagObject } from '../../../shared/models/activitypub/objects/co
 import { VideoCommentObject } from '../../../shared/models/activitypub/objects/video-comment-object'
 import { VideoComment } from '../../../shared/models/videos/video-comment.model'
 import { isActivityPubUrlValid } from '../../helpers/custom-validators/activitypub/misc'
-import { CONFIG, CONSTRAINTS_FIELDS } from '../../initializers'
+import { CONSTRAINTS_FIELDS, WEBSERVER } from '../../initializers/constants'
 import { sendDeleteVideoComment } from '../../lib/activitypub/send'
 import { AccountModel } from '../account/account'
 import { ActorModel } from '../activitypub/actor'
@@ -458,7 +457,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
     const query = {
       where: {
         updatedAt: {
-          [Op.lt]: beforeUpdatedAt
+          [Sequelize.Op.lt]: beforeUpdatedAt
         },
         videoId
       }
@@ -483,7 +482,7 @@ export class VideoCommentModel extends Model<VideoCommentModel> {
     let result: string[] = []
 
     const localMention = `@(${actorNameAlphabet}+)`
-    const remoteMention = `${localMention}@${CONFIG.WEBSERVER.HOST}`
+    const remoteMention = `${localMention}@${WEBSERVER.HOST}`
 
     const mentionRegex = this.isOwned()
       ? '(?:(?:' + remoteMention + ')|(?:' + localMention + '))' // Include local mentions?