diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-15 15:12:23 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | 8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391 (patch) | |
tree | a59070f4dc6b52a5b422bd31a8eb8ea3bff831a0 /shared | |
parent | 59c857da5961e2bcddcfd07832783c1e4afcd01a (diff) | |
download | PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.tar.gz PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.tar.zst PeerTube-8e13fa7d09e9925b4559cbba6c5d72c5ff1bd391.zip |
Add video abuse to activity pub
Diffstat (limited to 'shared')
-rw-r--r-- | shared/models/activitypub/activity.ts | 8 | ||||
-rw-r--r-- | shared/models/activitypub/objects/index.ts | 1 | ||||
-rw-r--r-- | shared/models/activitypub/objects/video-abuse-object.ts | 5 | ||||
-rw-r--r-- | shared/models/activitypub/objects/video-channel-object.ts | 2 | ||||
-rw-r--r-- | shared/models/videos/video-abuse.model.ts | 4 |
5 files changed, 12 insertions, 8 deletions
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts index 254daf118..506e64eff 100644 --- a/shared/models/activitypub/activity.ts +++ b/shared/models/activitypub/activity.ts | |||
@@ -1,8 +1,6 @@ | |||
1 | import { | 1 | import { VideoChannelObject, VideoTorrentObject } from './objects' |
2 | VideoChannelObject, | ||
3 | VideoTorrentObject | ||
4 | } from './objects' | ||
5 | import { ActivityPubSignature } from './activitypub-signature' | 2 | import { ActivityPubSignature } from './activitypub-signature' |
3 | import { VideoAbuseObject } from './objects/video-abuse-object' | ||
6 | 4 | ||
7 | export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag | | 5 | export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag | |
8 | ActivityDelete | ActivityFollow | ActivityAccept | 6 | ActivityDelete | ActivityFollow | ActivityAccept |
@@ -21,7 +19,7 @@ export interface BaseActivity { | |||
21 | 19 | ||
22 | export interface ActivityCreate extends BaseActivity { | 20 | export interface ActivityCreate extends BaseActivity { |
23 | type: 'Create' | 21 | type: 'Create' |
24 | object: VideoChannelObject | 22 | object: VideoChannelObject | VideoAbuseObject |
25 | } | 23 | } |
26 | 24 | ||
27 | export interface ActivityAdd extends BaseActivity { | 25 | export interface ActivityAdd extends BaseActivity { |
diff --git a/shared/models/activitypub/objects/index.ts b/shared/models/activitypub/objects/index.ts index 8c2e2daca..cd772b28d 100644 --- a/shared/models/activitypub/objects/index.ts +++ b/shared/models/activitypub/objects/index.ts | |||
@@ -1,3 +1,4 @@ | |||
1 | export * from './common-objects' | 1 | export * from './common-objects' |
2 | export * from './video-abuse-object' | ||
2 | export * from './video-channel-object' | 3 | export * from './video-channel-object' |
3 | export * from './video-torrent-object' | 4 | export * from './video-torrent-object' |
diff --git a/shared/models/activitypub/objects/video-abuse-object.ts b/shared/models/activitypub/objects/video-abuse-object.ts new file mode 100644 index 000000000..40e7abd57 --- /dev/null +++ b/shared/models/activitypub/objects/video-abuse-object.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export interface VideoAbuseObject { | ||
2 | type: 'Flag', | ||
3 | content: string | ||
4 | object: string | ||
5 | } | ||
diff --git a/shared/models/activitypub/objects/video-channel-object.ts b/shared/models/activitypub/objects/video-channel-object.ts index 72efe42b3..de504d84c 100644 --- a/shared/models/activitypub/objects/video-channel-object.ts +++ b/shared/models/activitypub/objects/video-channel-object.ts | |||
@@ -1,5 +1,3 @@ | |||
1 | import { ActivityIdentifierObject } from './common-objects' | ||
2 | |||
3 | export interface VideoChannelObject { | 1 | export interface VideoChannelObject { |
4 | type: 'VideoChannel' | 2 | type: 'VideoChannel' |
5 | id: string | 3 | id: string |
diff --git a/shared/models/videos/video-abuse.model.ts b/shared/models/videos/video-abuse.model.ts index 38041e491..aaedd00d4 100644 --- a/shared/models/videos/video-abuse.model.ts +++ b/shared/models/videos/video-abuse.model.ts | |||
@@ -1,8 +1,10 @@ | |||
1 | export interface VideoAbuse { | 1 | export interface VideoAbuse { |
2 | id: number | 2 | id: number |
3 | reporterServerHost: string | ||
4 | reason: string | 3 | reason: string |
5 | reporterUsername: string | 4 | reporterUsername: string |
5 | reporterServerHost: string | ||
6 | videoId: number | 6 | videoId: number |
7 | videoUUID: string | ||
8 | videoName: string | ||
7 | createdAt: Date | 9 | createdAt: Date |
8 | } | 10 | } |