diff options
Diffstat (limited to 'shared/models/activitypub')
-rw-r--r-- | shared/models/activitypub/activity.ts | 5 | ||||
-rw-r--r-- | shared/models/activitypub/objects/common-objects.ts | 11 | ||||
-rw-r--r-- | shared/models/activitypub/objects/video-abuse-object.ts | 5 |
3 files changed, 18 insertions, 3 deletions
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts index 20ecf176c..31b9e4673 100644 --- a/shared/models/activitypub/activity.ts +++ b/shared/models/activitypub/activity.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { ActivityPubActor } from './activitypub-actor' | 1 | import { ActivityPubActor } from './activitypub-actor' |
2 | import { ActivityPubSignature } from './activitypub-signature' | 2 | import { ActivityPubSignature } from './activitypub-signature' |
3 | import { CacheFileObject, VideoTorrentObject } from './objects' | 3 | import { CacheFileObject, VideoTorrentObject, ActivityFlagReasonObject } from './objects' |
4 | import { DislikeObject } from './objects/dislike-object' | 4 | import { DislikeObject } from './objects/dislike-object' |
5 | import { VideoAbuseObject } from './objects/video-abuse-object' | 5 | import { VideoAbuseObject } from './objects/video-abuse-object' |
6 | import { VideoCommentObject } from './objects/video-comment-object' | 6 | import { VideoCommentObject } from './objects/video-comment-object' |
@@ -113,4 +113,7 @@ export interface ActivityFlag extends BaseActivity { | |||
113 | type: 'Flag' | 113 | type: 'Flag' |
114 | content: string | 114 | content: string |
115 | object: APObject | APObject[] | 115 | object: APObject | APObject[] |
116 | tag?: ActivityFlagReasonObject[] | ||
117 | startAt?: number | ||
118 | endAt?: number | ||
116 | } | 119 | } |
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 @@ | |||
1 | import { VideoAbusePredefinedReasonsString } from '@shared/models/videos' | ||
2 | |||
1 | export interface ActivityIdentifierObject { | 3 | export 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 | ||
72 | export interface ActivityHashTagObject { | 74 | export 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 | ||
78 | export interface ActivityMentionObject { | 80 | export 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 | ||
86 | export interface ActivityFlagReasonObject { | ||
87 | type: 'Hashtag' | ||
88 | name: VideoAbusePredefinedReasonsString | ||
89 | } | ||
90 | |||
84 | export type ActivityTagObject = | 91 | export 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 @@ | |||
1 | import { ActivityFlagReasonObject } from './common-objects' | ||
2 | |||
1 | export interface VideoAbuseObject { | 3 | export 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 | } |