X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fmodels%2Faccount%2Fuser-notification-setting.ts;h=de150129922ca57e0dced2524d2a9c222030d331;hb=32a18cbf33a7cdbbe3d4885d32e4b67e19cdc1cf;hp=ebab8b6d2c58c2fcae57c340934796c8d7967309;hpb=3fbc6974334ca58c068f0f9def0b0a40db2a6de1;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/models/account/user-notification-setting.ts b/server/models/account/user-notification-setting.ts index ebab8b6d2..de1501299 100644 --- a/server/models/account/user-notification-setting.ts +++ b/server/models/account/user-notification-setting.ts @@ -156,6 +156,24 @@ export class UserNotificationSettingModel extends Model { @Column abuseNewMessage: UserNotificationSettingValue + @AllowNull(false) + @Default(null) + @Is( + 'UserNotificationSettingNewPeerTubeVersion', + value => throwIfNotValid(value, isUserNotificationSettingValid, 'newPeerTubeVersion') + ) + @Column + newPeerTubeVersion: UserNotificationSettingValue + + @AllowNull(false) + @Default(null) + @Is( + 'UserNotificationSettingNewPeerPluginVersion', + value => throwIfNotValid(value, isUserNotificationSettingValid, 'newPluginVersion') + ) + @Column + newPluginVersion: UserNotificationSettingValue + @ForeignKey(() => UserModel) @Column userId: number @@ -195,7 +213,9 @@ export class UserNotificationSettingModel extends Model { newInstanceFollower: this.newInstanceFollower, autoInstanceFollowing: this.autoInstanceFollowing, abuseNewMessage: this.abuseNewMessage, - abuseStateChange: this.abuseStateChange + abuseStateChange: this.abuseStateChange, + newPeerTubeVersion: this.newPeerTubeVersion, + newPluginVersion: this.newPluginVersion } } }