aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-08 17:26:01 +0200
committerChocobozzz <me@florianbigard.com>2019-04-08 17:30:48 +0200
commit883993c81ecc2388d4a4b37b29b81b6de73d264f (patch)
treef0f76995b6762b10a0c1a7ccc2b5d952f68014ea /server/middlewares
parent0dc647775881eb1378b213a530996cd096de24ea (diff)
downloadPeerTube-883993c81ecc2388d4a4b37b29b81b6de73d264f.tar.gz
PeerTube-883993c81ecc2388d4a4b37b29b81b6de73d264f.tar.zst
PeerTube-883993c81ecc2388d4a4b37b29b81b6de73d264f.zip
Add notification on new instance follower (server side)
Diffstat (limited to 'server/middlewares')
-rw-r--r--server/middlewares/validators/user-notifications.ts14
1 files changed, 14 insertions, 0 deletions
diff --git a/server/middlewares/validators/user-notifications.ts b/server/middlewares/validators/user-notifications.ts
index 46486e081..3ded8d8cf 100644
--- a/server/middlewares/validators/user-notifications.ts
+++ b/server/middlewares/validators/user-notifications.ts
@@ -28,8 +28,22 @@ const updateNotificationSettingsValidator = [
28 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new comment on my video notification setting'), 28 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new comment on my video notification setting'),
29 body('videoAbuseAsModerator') 29 body('videoAbuseAsModerator')
30 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new video abuse as moderator notification setting'), 30 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new video abuse as moderator notification setting'),
31 body('videoAutoBlacklistAsModerator')
32 .custom(isUserNotificationSettingValid).withMessage('Should have a valid video auto blacklist notification setting'),
31 body('blacklistOnMyVideo') 33 body('blacklistOnMyVideo')
32 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new blacklist on my video notification setting'), 34 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new blacklist on my video notification setting'),
35 body('myVideoImportFinished')
36 .custom(isUserNotificationSettingValid).withMessage('Should have a valid video import finished video notification setting'),
37 body('myVideoPublished')
38 .custom(isUserNotificationSettingValid).withMessage('Should have a valid video published notification setting'),
39 body('commentMention')
40 .custom(isUserNotificationSettingValid).withMessage('Should have a valid comment mention notification setting'),
41 body('newFollow')
42 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new follow notification setting'),
43 body('newUserRegistration')
44 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new user registration notification setting'),
45 body('newInstanceFollower')
46 .custom(isUserNotificationSettingValid).withMessage('Should have a valid new instance follower notification setting'),
33 47
34 (req: express.Request, res: express.Response, next: express.NextFunction) => { 48 (req: express.Request, res: express.Response, next: express.NextFunction) => {
35 logger.debug('Checking updateNotificationSettingsValidator parameters', { parameters: req.body }) 49 logger.debug('Checking updateNotificationSettingsValidator parameters', { parameters: req.body })