import {
AbuseState,
JobType,
+ UserRegistrationState,
VideoChannelSyncState,
VideoImportState,
VideoPrivacy,
ACCOUNT_FOLLOWERS: [ 'createdAt' ],
CHANNEL_FOLLOWERS: [ 'createdAt' ],
+ USER_REGISTRATIONS: [ 'createdAt', 'state' ],
+
VIDEOS: [ 'name', 'duration', 'createdAt', 'publishedAt', 'originallyPublishedAt', 'views', 'likes', 'trending', 'hot', 'best' ],
// Don't forget to update peertube-search-index with the same values
ABUSE_MESSAGES: {
MESSAGE: { min: 2, max: 3000 } // Length
},
+ USER_REGISTRATIONS: {
+ REASON_MESSAGE: { min: 2, max: 3000 }, // Length
+ MODERATOR_MESSAGE: { min: 2, max: 3000 } // Length
+ },
VIDEO_BLACKLIST: {
REASON: { min: 2, max: 300 } // Length
},
[AbuseState.ACCEPTED]: 'Accepted'
}
+const USER_REGISTRATION_STATES: { [ id in UserRegistrationState ]: string } = {
+ [UserRegistrationState.PENDING]: 'Pending',
+ [UserRegistrationState.REJECTED]: 'Rejected',
+ [UserRegistrationState.ACCEPTED]: 'Accepted'
+}
+
const VIDEO_PLAYLIST_PRIVACIES: { [ id in VideoPlaylistPrivacy ]: string } = {
[VideoPlaylistPrivacy.PUBLIC]: 'Public',
[VideoPlaylistPrivacy.UNLISTED]: 'Unlisted',
const TWO_FACTOR_AUTH_REQUEST_TOKEN_LIFETIME = 60000 * 10 // 10 minutes
-const USER_EMAIL_VERIFY_LIFETIME = 60000 * 60 // 60 minutes
+const EMAIL_VERIFY_LIFETIME = 60000 * 60 // 60 minutes
const NSFW_POLICY_TYPES: { [ id: string ]: NSFWPolicyType } = {
DO_NOT_LIST: 'do_not_list',
VIDEO_TRANSCODING_FPS,
FFMPEG_NICE,
ABUSE_STATES,
+ USER_REGISTRATION_STATES,
LRU_CACHE,
REQUEST_TIMEOUTS,
MAX_LOCAL_VIEWER_WATCH_SECTIONS,
USER_PASSWORD_RESET_LIFETIME,
USER_PASSWORD_CREATE_LIFETIME,
MEMOIZE_TTL,
- USER_EMAIL_VERIFY_LIFETIME,
+ EMAIL_VERIFY_LIFETIME,
OVERVIEWS,
SCHEDULER_INTERVALS_MS,
REPEAT_JOBS,