diff options
Diffstat (limited to 'server/models/account/user-notification-setting.ts')
-rw-r--r-- | server/models/account/user-notification-setting.ts | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/server/models/account/user-notification-setting.ts b/server/models/account/user-notification-setting.ts index 6470defa7..f1c3ac223 100644 --- a/server/models/account/user-notification-setting.ts +++ b/server/models/account/user-notification-setting.ts | |||
@@ -83,6 +83,33 @@ export class UserNotificationSettingModel extends Model<UserNotificationSettingM | |||
83 | @Column | 83 | @Column |
84 | myVideoImportFinished: UserNotificationSettingValue | 84 | myVideoImportFinished: UserNotificationSettingValue |
85 | 85 | ||
86 | @AllowNull(false) | ||
87 | @Default(null) | ||
88 | @Is( | ||
89 | 'UserNotificationSettingNewUserRegistration', | ||
90 | value => throwIfNotValid(value, isUserNotificationSettingValid, 'newUserRegistration') | ||
91 | ) | ||
92 | @Column | ||
93 | newUserRegistration: UserNotificationSettingValue | ||
94 | |||
95 | @AllowNull(false) | ||
96 | @Default(null) | ||
97 | @Is( | ||
98 | 'UserNotificationSettingNewFollow', | ||
99 | value => throwIfNotValid(value, isUserNotificationSettingValid, 'newFollow') | ||
100 | ) | ||
101 | @Column | ||
102 | newFollow: UserNotificationSettingValue | ||
103 | |||
104 | @AllowNull(false) | ||
105 | @Default(null) | ||
106 | @Is( | ||
107 | 'UserNotificationSettingCommentMention', | ||
108 | value => throwIfNotValid(value, isUserNotificationSettingValid, 'commentMention') | ||
109 | ) | ||
110 | @Column | ||
111 | commentMention: UserNotificationSettingValue | ||
112 | |||
86 | @ForeignKey(() => UserModel) | 113 | @ForeignKey(() => UserModel) |
87 | @Column | 114 | @Column |
88 | userId: number | 115 | userId: number |
@@ -114,7 +141,10 @@ export class UserNotificationSettingModel extends Model<UserNotificationSettingM | |||
114 | videoAbuseAsModerator: this.videoAbuseAsModerator, | 141 | videoAbuseAsModerator: this.videoAbuseAsModerator, |
115 | blacklistOnMyVideo: this.blacklistOnMyVideo, | 142 | blacklistOnMyVideo: this.blacklistOnMyVideo, |
116 | myVideoPublished: this.myVideoPublished, | 143 | myVideoPublished: this.myVideoPublished, |
117 | myVideoImportFinished: this.myVideoImportFinished | 144 | myVideoImportFinished: this.myVideoImportFinished, |
145 | newUserRegistration: this.newUserRegistration, | ||
146 | commentMention: this.commentMention, | ||
147 | newFollow: this.newFollow | ||
118 | } | 148 | } |
119 | } | 149 | } |
120 | } | 150 | } |