isUserRoleValid,
isUserUsernameValid,
isUserVideoQuotaDailyValid,
- isUserVideoQuotaValid
+ isUserVideoQuotaValid,
+ isUserWebTorrentEnabledValid
} from '../../helpers/custom-validators/users'
import { comparePassword, cryptPassword } from '../../helpers/peertube-crypto'
import { OAuthTokenModel } from '../oauth/oauth-token'
@Column(DataType.ENUM(values(NSFW_POLICY_TYPES)))
nsfwPolicy: NSFWPolicyType
+ @AllowNull(false)
+ @Default(true)
+ @Is('UserWebTorrentEnabled', value => throwIfNotValid(value, isUserWebTorrentEnabledValid, 'WebTorrent enabled'))
+ @Column
+ webTorrentEnabled: boolean
+
@AllowNull(false)
@Default(true)
@Is('UserAutoPlayVideo', value => throwIfNotValid(value, isUserAutoPlayVideoValid, 'auto play video boolean'))
email: this.email,
emailVerified: this.emailVerified,
nsfwPolicy: this.nsfwPolicy,
+ webTorrentEnabled: this.webTorrentEnabled,
autoPlayVideo: this.autoPlayVideo,
role: this.role,
roleLabel: USER_ROLE_LABELS[ this.role ],