aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-10 14:34:45 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:51 +0100
commit0d0e8dd0904b380b70e19ebcb4763d65601c4632 (patch)
treeacb625d7c88fbe863fa14bf6783fafe4a8e35137 /shared
parente4f97babf701481b55cc10fb3448feab5f97c867 (diff)
downloadPeerTube-0d0e8dd0904b380b70e19ebcb4763d65601c4632.tar.gz
PeerTube-0d0e8dd0904b380b70e19ebcb4763d65601c4632.tar.zst
PeerTube-0d0e8dd0904b380b70e19ebcb4763d65601c4632.zip
Continue activitypub
Diffstat (limited to 'shared')
-rw-r--r--shared/models/activitypub/activity.ts9
-rw-r--r--shared/models/activitypub/objects/video-channel-object.ts5
-rw-r--r--shared/models/activitypub/objects/video-torrent-object.ts1
3 files changed, 12 insertions, 3 deletions
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts
index 0274416b2..dc562c00a 100644
--- a/shared/models/activitypub/activity.ts
+++ b/shared/models/activitypub/activity.ts
@@ -7,7 +7,7 @@ import { ActivityPubSignature } from './activitypub-signature'
7export type Activity = ActivityCreate | ActivityUpdate | ActivityFlag 7export type Activity = ActivityCreate | ActivityUpdate | ActivityFlag
8 8
9// Flag -> report abuse 9// Flag -> report abuse
10export type ActivityType = 'Create' | 'Update' | 'Flag' 10export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag'
11 11
12export interface BaseActivity { 12export interface BaseActivity {
13 '@context'?: any[] 13 '@context'?: any[]
@@ -20,7 +20,12 @@ export interface BaseActivity {
20 20
21export interface ActivityCreate extends BaseActivity { 21export interface ActivityCreate extends BaseActivity {
22 type: 'Create' 22 type: 'Create'
23 object: VideoTorrentObject | VideoChannelObject 23 object: VideoChannelObject
24}
25
26export interface ActivityAdd extends BaseActivity {
27 type: 'Add'
28 object: VideoTorrentObject
24} 29}
25 30
26export interface ActivityUpdate extends BaseActivity { 31export interface ActivityUpdate extends BaseActivity {
diff --git a/shared/models/activitypub/objects/video-channel-object.ts b/shared/models/activitypub/objects/video-channel-object.ts
index d64b4aed8..72efe42b3 100644
--- a/shared/models/activitypub/objects/video-channel-object.ts
+++ b/shared/models/activitypub/objects/video-channel-object.ts
@@ -2,7 +2,10 @@ import { ActivityIdentifierObject } from './common-objects'
2 2
3export interface VideoChannelObject { 3export interface VideoChannelObject {
4 type: 'VideoChannel' 4 type: 'VideoChannel'
5 id: string
5 name: string 6 name: string
6 content: string 7 content: string
7 uuid: ActivityIdentifierObject 8 uuid: string
9 published: Date
10 updated: Date
8} 11}
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts
index 00cc0a649..5685a43e0 100644
--- a/shared/models/activitypub/objects/video-torrent-object.ts
+++ b/shared/models/activitypub/objects/video-torrent-object.ts
@@ -7,6 +7,7 @@ import {
7 7
8export interface VideoTorrentObject { 8export interface VideoTorrentObject {
9 type: 'Video' 9 type: 'Video'
10 id: string
10 name: string 11 name: string
11 duration: string 12 duration: string
12 uuid: string 13 uuid: string