diff options
author | Chocobozzz <me@florianbigard.com> | 2019-01-04 08:56:20 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-01-09 11:15:15 +0100 |
commit | f7cc67b455a12ccae9b0ea16876d166720364357 (patch) | |
tree | eac2cdbf2e92a16b3eda5d74371c82bd79ae22cb /server/models/account/user-notification-setting.ts | |
parent | dc13348070d808d0ba3feb56a435b835c2e7e791 (diff) | |
download | PeerTube-f7cc67b455a12ccae9b0ea16876d166720364357.tar.gz PeerTube-f7cc67b455a12ccae9b0ea16876d166720364357.tar.zst PeerTube-f7cc67b455a12ccae9b0ea16876d166720364357.zip |
Add new follow, mention and user registered notifs
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 | } |