]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/account/user-notification-setting.ts
Cleaner warning of IP address leaking on embedded videos (#2034)
[github/Chocobozzz/PeerTube.git] / server / models / account / user-notification-setting.ts
index 6470defa75c927319dc203e0b9ecb95e02e67c59..c2fbc6d23cc150b673bd9d02d524ef345718529f 100644 (file)
@@ -56,6 +56,15 @@ export class UserNotificationSettingModel extends Model<UserNotificationSettingM
   @Column
   videoAbuseAsModerator: UserNotificationSettingValue
 
+  @AllowNull(false)
+  @Default(null)
+  @Is(
+    'UserNotificationSettingVideoAutoBlacklistAsModerator',
+    value => throwIfNotValid(value, isUserNotificationSettingValid, 'videoAutoBlacklistAsModerator')
+  )
+  @Column
+  videoAutoBlacklistAsModerator: UserNotificationSettingValue
+
   @AllowNull(false)
   @Default(null)
   @Is(
@@ -83,6 +92,42 @@ export class UserNotificationSettingModel extends Model<UserNotificationSettingM
   @Column
   myVideoImportFinished: UserNotificationSettingValue
 
+  @AllowNull(false)
+  @Default(null)
+  @Is(
+    'UserNotificationSettingNewUserRegistration',
+    value => throwIfNotValid(value, isUserNotificationSettingValid, 'newUserRegistration')
+  )
+  @Column
+  newUserRegistration: UserNotificationSettingValue
+
+  @AllowNull(false)
+  @Default(null)
+  @Is(
+    'UserNotificationSettingNewInstanceFollower',
+    value => throwIfNotValid(value, isUserNotificationSettingValid, 'newInstanceFollower')
+  )
+  @Column
+  newInstanceFollower: UserNotificationSettingValue
+
+  @AllowNull(false)
+  @Default(null)
+  @Is(
+    'UserNotificationSettingNewFollow',
+    value => throwIfNotValid(value, isUserNotificationSettingValid, 'newFollow')
+  )
+  @Column
+  newFollow: UserNotificationSettingValue
+
+  @AllowNull(false)
+  @Default(null)
+  @Is(
+    'UserNotificationSettingCommentMention',
+    value => throwIfNotValid(value, isUserNotificationSettingValid, 'commentMention')
+  )
+  @Column
+  commentMention: UserNotificationSettingValue
+
   @ForeignKey(() => UserModel)
   @Column
   userId: number
@@ -112,9 +157,14 @@ export class UserNotificationSettingModel extends Model<UserNotificationSettingM
       newCommentOnMyVideo: this.newCommentOnMyVideo,
       newVideoFromSubscription: this.newVideoFromSubscription,
       videoAbuseAsModerator: this.videoAbuseAsModerator,
+      videoAutoBlacklistAsModerator: this.videoAutoBlacklistAsModerator,
       blacklistOnMyVideo: this.blacklistOnMyVideo,
       myVideoPublished: this.myVideoPublished,
-      myVideoImportFinished: this.myVideoImportFinished
+      myVideoImportFinished: this.myVideoImportFinished,
+      newUserRegistration: this.newUserRegistration,
+      commentMention: this.commentMention,
+      newFollow: this.newFollow,
+      newInstanceFollower: this.newInstanceFollower
     }
   }
 }