aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models/activitypub/objects
diff options
context:
space:
mode:
authorRigel Kent <sendmemail@rigelk.eu>2020-06-22 13:00:39 +0200
committerGitHub <noreply@github.com>2020-06-22 13:00:39 +0200
commit1ebddadd0704812a4600c39cabe2268321e88331 (patch)
tree1cc8560e5b63e9976aa5411ba800a62cfe7b8ea9 /shared/models/activitypub/objects
parent07aea1a2642fc9868cb01e30c322514029d5b95a (diff)
downloadPeerTube-1ebddadd0704812a4600c39cabe2268321e88331.tar.gz
PeerTube-1ebddadd0704812a4600c39cabe2268321e88331.tar.zst
PeerTube-1ebddadd0704812a4600c39cabe2268321e88331.zip
predefined report reasons & improved reporter UI (#2842)
- added `startAt` and `endAt` optional timestamps to help pin down reported sections of a video - added predefined report reasons - added video player with report modal
Diffstat (limited to 'shared/models/activitypub/objects')
-rw-r--r--shared/models/activitypub/objects/common-objects.ts11
-rw-r--r--shared/models/activitypub/objects/video-abuse-object.ts5
2 files changed, 14 insertions, 2 deletions
diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts
index bb3ffe678..096d422ea 100644
--- a/shared/models/activitypub/objects/common-objects.ts
+++ b/shared/models/activitypub/objects/common-objects.ts
@@ -1,3 +1,5 @@
1import { VideoAbusePredefinedReasonsString } from '@shared/models/videos'
2
1export interface ActivityIdentifierObject { 3export interface ActivityIdentifierObject {
2 identifier: string 4 identifier: string
3 name: string 5 name: string
@@ -70,17 +72,22 @@ export type ActivityHtmlUrlObject = {
70} 72}
71 73
72export interface ActivityHashTagObject { 74export interface ActivityHashTagObject {
73 type: 'Hashtag' | 'Mention' 75 type: 'Hashtag'
74 href?: string 76 href?: string
75 name: string 77 name: string
76} 78}
77 79
78export interface ActivityMentionObject { 80export interface ActivityMentionObject {
79 type: 'Hashtag' | 'Mention' 81 type: 'Mention'
80 href?: string 82 href?: string
81 name: string 83 name: string
82} 84}
83 85
86export interface ActivityFlagReasonObject {
87 type: 'Hashtag'
88 name: VideoAbusePredefinedReasonsString
89}
90
84export type ActivityTagObject = 91export type ActivityTagObject =
85 ActivityPlaylistSegmentHashesObject 92 ActivityPlaylistSegmentHashesObject
86 | ActivityPlaylistInfohashesObject 93 | ActivityPlaylistInfohashesObject
diff --git a/shared/models/activitypub/objects/video-abuse-object.ts b/shared/models/activitypub/objects/video-abuse-object.ts
index d9622b414..73add8ef4 100644
--- a/shared/models/activitypub/objects/video-abuse-object.ts
+++ b/shared/models/activitypub/objects/video-abuse-object.ts
@@ -1,5 +1,10 @@
1import { ActivityFlagReasonObject } from './common-objects'
2
1export interface VideoAbuseObject { 3export interface VideoAbuseObject {
2 type: 'Flag' 4 type: 'Flag'
3 content: string 5 content: string
4 object: string | string[] 6 object: string | string[]
7 tag?: ActivityFlagReasonObject[]
8 startAt?: number
9 endAt?: number
5} 10}