From 32a18cbf33a7cdbbe3d4885d32e4b67e19cdc1cf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 11 Mar 2021 16:54:52 +0100 Subject: Add new plugin/peertube version notifs --- server/models/account/user-notification-setting.ts | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'server/models/account/user-notification-setting.ts') 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 } } } -- cgit v1.2.3