aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/activitypub/objects
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-07-01 16:05:30 +0200
committerChocobozzz <chocobozzz@cpy.re>2020-07-10 14:02:41 +0200
commitd95d15598847c7f020aa056e7e6e0c02d2bbf732 (patch)
treea8a593f1269688caf9e5f99559996f346290fec5 /shared/models/activitypub/objects
parent72493e44e9b455a04c4f093ed6c6ffa300b98d8b (diff)
downloadPeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.tar.gz
PeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.tar.zst
PeerTube-d95d15598847c7f020aa056e7e6e0c02d2bbf732.zip
Use 3 tables to represent abuses
Diffstat (limited to 'shared/models/activitypub/objects')
-rw-r--r--shared/models/activitypub/objects/abuse-object.ts (renamed from shared/models/activitypub/objects/video-abuse-object.ts)4
-rw-r--r--shared/models/activitypub/objects/common-objects.ts4
-rw-r--r--shared/models/activitypub/objects/index.ts4
3 files changed, 7 insertions, 5 deletions
diff --git a/shared/models/activitypub/objects/video-abuse-object.ts b/shared/models/activitypub/objects/abuse-object.ts
index 73add8ef4..ad45cc064 100644
--- a/shared/models/activitypub/objects/video-abuse-object.ts
+++ b/shared/models/activitypub/objects/abuse-object.ts
@@ -1,10 +1,12 @@
1import { ActivityFlagReasonObject } from './common-objects' 1import { ActivityFlagReasonObject } from './common-objects'
2 2
3export interface VideoAbuseObject { 3export interface AbuseObject {
4 type: 'Flag' 4 type: 'Flag'
5 content: string 5 content: string
6 object: string | string[] 6 object: string | string[]
7
7 tag?: ActivityFlagReasonObject[] 8 tag?: ActivityFlagReasonObject[]
9
8 startAt?: number 10 startAt?: number
9 endAt?: number 11 endAt?: number
10} 12}
diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts
index 096d422ea..711ce45f4 100644
--- a/shared/models/activitypub/objects/common-objects.ts
+++ b/shared/models/activitypub/objects/common-objects.ts
@@ -1,4 +1,4 @@
1import { VideoAbusePredefinedReasonsString } from '@shared/models/videos' 1import { AbusePredefinedReasonsString } from '@shared/models'
2 2
3export interface ActivityIdentifierObject { 3export interface ActivityIdentifierObject {
4 identifier: string 4 identifier: string
@@ -85,7 +85,7 @@ export interface ActivityMentionObject {
85 85
86export interface ActivityFlagReasonObject { 86export interface ActivityFlagReasonObject {
87 type: 'Hashtag' 87 type: 'Hashtag'
88 name: VideoAbusePredefinedReasonsString 88 name: AbusePredefinedReasonsString
89} 89}
90 90
91export type ActivityTagObject = 91export type ActivityTagObject =
diff --git a/shared/models/activitypub/objects/index.ts b/shared/models/activitypub/objects/index.ts
index fba61e12f..a6a20e87a 100644
--- a/shared/models/activitypub/objects/index.ts
+++ b/shared/models/activitypub/objects/index.ts
@@ -1,6 +1,6 @@
1export * from './abuse-object'
1export * from './cache-file-object' 2export * from './cache-file-object'
2export * from './common-objects' 3export * from './common-objects'
3export * from './video-abuse-object' 4export * from './dislike-object'
4export * from './video-torrent-object' 5export * from './video-torrent-object'
5export * from './view-object' 6export * from './view-object'
6export * from './dislike-object'