aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorJosh Morel <morel.josh@hotmail.com>2019-04-02 05:26:47 -0400
committerChocobozzz <chocobozzz@cpy.re>2019-04-02 11:26:47 +0200
commit7ccddd7b5250bd25a917a6e77e58b87b9484a2a4 (patch)
treee75dc991369c1768804fefa114eb2a832881087f /shared/models
parent12fed49ebab0c414713d57ea316b6488ae6bef99 (diff)
downloadPeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.tar.gz
PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.tar.zst
PeerTube-7ccddd7b5250bd25a917a6e77e58b87b9484a2a4.zip
add quarantine videos feature (#1637)
* add quarantine videos feature * increase Notification settings test timeout to 20000ms. was completing 7000 locally but timing out after 10000 on travis * fix quarantine video test issues -propagate misspelling -remove skip from server/tests/client.ts * WIP use blacklist for moderator video approval instead of video.quarantine boolean * finish auto-blacklist feature
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/server/custom-config.model.ts9
-rw-r--r--shared/models/server/server-config.model.ts8
-rw-r--r--shared/models/users/user-notification-setting.model.ts1
-rw-r--r--shared/models/users/user-notification.model.ts4
-rw-r--r--shared/models/videos/blacklist/video-blacklist.model.ts20
5 files changed, 30 insertions, 12 deletions
diff --git a/shared/models/server/custom-config.model.ts b/shared/models/server/custom-config.model.ts
index 20b261426..1607b40a8 100644
--- a/shared/models/server/custom-config.model.ts
+++ b/shared/models/server/custom-config.model.ts
@@ -77,4 +77,13 @@ export interface CustomConfig {
77 } 77 }
78 } 78 }
79 } 79 }
80
81 autoBlacklist: {
82 videos: {
83 ofUsers: {
84 enabled: boolean
85 }
86 }
87 }
88
80} 89}
diff --git a/shared/models/server/server-config.model.ts b/shared/models/server/server-config.model.ts
index 0200d88ca..dcc45be8a 100644
--- a/shared/models/server/server-config.model.ts
+++ b/shared/models/server/server-config.model.ts
@@ -49,6 +49,14 @@ export interface ServerConfig {
49 } 49 }
50 } 50 }
51 51
52 autoBlacklist: {
53 videos: {
54 ofUsers: {
55 enabled: boolean
56 }
57 }
58 }
59
52 avatar: { 60 avatar: {
53 file: { 61 file: {
54 size: { 62 size: {
diff --git a/shared/models/users/user-notification-setting.model.ts b/shared/models/users/user-notification-setting.model.ts
index 531e12bba..57b33e4b8 100644
--- a/shared/models/users/user-notification-setting.model.ts
+++ b/shared/models/users/user-notification-setting.model.ts
@@ -8,6 +8,7 @@ export interface UserNotificationSetting {
8 newVideoFromSubscription: UserNotificationSettingValue 8 newVideoFromSubscription: UserNotificationSettingValue
9 newCommentOnMyVideo: UserNotificationSettingValue 9 newCommentOnMyVideo: UserNotificationSettingValue
10 videoAbuseAsModerator: UserNotificationSettingValue 10 videoAbuseAsModerator: UserNotificationSettingValue
11 videoAutoBlacklistAsModerator: UserNotificationSettingValue
11 blacklistOnMyVideo: UserNotificationSettingValue 12 blacklistOnMyVideo: UserNotificationSettingValue
12 myVideoPublished: UserNotificationSettingValue 13 myVideoPublished: UserNotificationSettingValue
13 myVideoImportFinished: UserNotificationSettingValue 14 myVideoImportFinished: UserNotificationSettingValue
diff --git a/shared/models/users/user-notification.model.ts b/shared/models/users/user-notification.model.ts
index 186b62612..19892b61a 100644
--- a/shared/models/users/user-notification.model.ts
+++ b/shared/models/users/user-notification.model.ts
@@ -13,7 +13,9 @@ export enum UserNotificationType {
13 13
14 NEW_USER_REGISTRATION = 9, 14 NEW_USER_REGISTRATION = 9,
15 NEW_FOLLOW = 10, 15 NEW_FOLLOW = 10,
16 COMMENT_MENTION = 11 16 COMMENT_MENTION = 11,
17
18 VIDEO_AUTO_BLACKLIST_FOR_MODERATORS = 12
17} 19}
18 20
19export interface VideoInfo { 21export interface VideoInfo {
diff --git a/shared/models/videos/blacklist/video-blacklist.model.ts b/shared/models/videos/blacklist/video-blacklist.model.ts
index 4bd976190..68d59e489 100644
--- a/shared/models/videos/blacklist/video-blacklist.model.ts
+++ b/shared/models/videos/blacklist/video-blacklist.model.ts
@@ -1,19 +1,17 @@
1import { Video } from '../video.model'
2
3export enum VideoBlacklistType {
4 MANUAL = 1,
5 AUTO_BEFORE_PUBLISHED = 2
6}
7
1export interface VideoBlacklist { 8export interface VideoBlacklist {
2 id: number 9 id: number
3 createdAt: Date 10 createdAt: Date
4 updatedAt: Date 11 updatedAt: Date
5 unfederated: boolean 12 unfederated: boolean
6 reason?: string 13 reason?: string
14 type: VideoBlacklistType
7 15
8 video: { 16 video: Video
9 id: number
10 name: string
11 uuid: string
12 description: string
13 duration: number
14 views: number
15 likes: number
16 dislikes: number
17 nsfw: boolean
18 }
19} 17}