1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Add notifications in the client

This commit is contained in:
Chocobozzz 2019-01-08 11:26:41 +01:00 committed by Chocobozzz
parent f7cc67b455
commit 2f1548fda3
56 changed files with 1073 additions and 112 deletions

View file

@ -9,8 +9,12 @@ function isUserNotificationTypeValid (value: any) {
function isUserNotificationSettingValid (value: any) {
return exists(value) &&
validator.isInt('' + value) &&
UserNotificationSettingValue[ value ] !== undefined
validator.isInt('' + value) && (
value === UserNotificationSettingValue.NONE ||
value === UserNotificationSettingValue.WEB ||
value === UserNotificationSettingValue.EMAIL ||
value === (UserNotificationSettingValue.WEB | UserNotificationSettingValue.EMAIL)
)
}
export {