aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-15 17:56:21 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:52 +0100
commitd846501818c2d29e66e6fd141789cb04fd55a437 (patch)
tree9b807a84459edd400fd36325c49c4adfbd6c4fd2 /shared
parent8e10cf1a5a438a00e5f7e0691cb830769867cffc (diff)
downloadPeerTube-d846501818c2d29e66e6fd141789cb04fd55a437.tar.gz
PeerTube-d846501818c2d29e66e6fd141789cb04fd55a437.tar.zst
PeerTube-d846501818c2d29e66e6fd141789cb04fd55a437.zip
Handle announces in inbox
Diffstat (limited to 'shared')
-rw-r--r--shared/models/activitypub/activity.ts9
-rw-r--r--shared/models/activitypub/objects/video-channel-object.ts1
-rw-r--r--shared/models/activitypub/objects/video-torrent-object.ts1
3 files changed, 9 insertions, 2 deletions
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts
index 506e64eff..b858bf759 100644
--- a/shared/models/activitypub/activity.ts
+++ b/shared/models/activitypub/activity.ts
@@ -3,10 +3,10 @@ import { ActivityPubSignature } from './activitypub-signature'
3import { VideoAbuseObject } from './objects/video-abuse-object' 3import { VideoAbuseObject } from './objects/video-abuse-object'
4 4
5export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag | 5export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag |
6 ActivityDelete | ActivityFollow | ActivityAccept 6 ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce
7 7
8// Flag -> report abuse 8// Flag -> report abuse
9export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag' | 'Delete' | 'Follow' | 'Accept' 9export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag' | 'Delete' | 'Follow' | 'Accept' | 'Announce'
10 10
11export interface BaseActivity { 11export interface BaseActivity {
12 '@context'?: any[] 12 '@context'?: any[]
@@ -49,3 +49,8 @@ export interface ActivityFollow extends BaseActivity {
49export interface ActivityAccept extends BaseActivity { 49export interface ActivityAccept extends BaseActivity {
50 type: 'Accept' 50 type: 'Accept'
51} 51}
52
53export interface ActivityAnnounce extends BaseActivity {
54 type: 'Announce'
55 object: VideoChannelObject | VideoTorrentObject
56}
diff --git a/shared/models/activitypub/objects/video-channel-object.ts b/shared/models/activitypub/objects/video-channel-object.ts
index de504d84c..468e1535e 100644
--- a/shared/models/activitypub/objects/video-channel-object.ts
+++ b/shared/models/activitypub/objects/video-channel-object.ts
@@ -6,4 +6,5 @@ export interface VideoChannelObject {
6 uuid: string 6 uuid: string
7 published: Date 7 published: Date
8 updated: Date 8 updated: Date
9 actor?: string
9} 10}
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts
index 5685a43e0..99e7157b8 100644
--- a/shared/models/activitypub/objects/video-torrent-object.ts
+++ b/shared/models/activitypub/objects/video-torrent-object.ts
@@ -23,4 +23,5 @@ export interface VideoTorrentObject {
23 content: string 23 content: string
24 icon: ActivityIconObject 24 icon: ActivityIconObject
25 url: ActivityUrlObject[] 25 url: ActivityUrlObject[]
26 actor?: string
26} 27}