diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-15 17:56:21 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:52 +0100 |
commit | d846501818c2d29e66e6fd141789cb04fd55a437 (patch) | |
tree | 9b807a84459edd400fd36325c49c4adfbd6c4fd2 /shared/models/activitypub | |
parent | 8e10cf1a5a438a00e5f7e0691cb830769867cffc (diff) | |
download | PeerTube-d846501818c2d29e66e6fd141789cb04fd55a437.tar.gz PeerTube-d846501818c2d29e66e6fd141789cb04fd55a437.tar.zst PeerTube-d846501818c2d29e66e6fd141789cb04fd55a437.zip |
Handle announces in inbox
Diffstat (limited to 'shared/models/activitypub')
-rw-r--r-- | shared/models/activitypub/activity.ts | 9 | ||||
-rw-r--r-- | shared/models/activitypub/objects/video-channel-object.ts | 1 | ||||
-rw-r--r-- | shared/models/activitypub/objects/video-torrent-object.ts | 1 |
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' | |||
3 | import { VideoAbuseObject } from './objects/video-abuse-object' | 3 | import { VideoAbuseObject } from './objects/video-abuse-object' |
4 | 4 | ||
5 | export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityFlag | | 5 | export 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 |
9 | export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag' | 'Delete' | 'Follow' | 'Accept' | 9 | export type ActivityType = 'Create' | 'Add' | 'Update' | 'Flag' | 'Delete' | 'Follow' | 'Accept' | 'Announce' |
10 | 10 | ||
11 | export interface BaseActivity { | 11 | export interface BaseActivity { |
12 | '@context'?: any[] | 12 | '@context'?: any[] |
@@ -49,3 +49,8 @@ export interface ActivityFollow extends BaseActivity { | |||
49 | export interface ActivityAccept extends BaseActivity { | 49 | export interface ActivityAccept extends BaseActivity { |
50 | type: 'Accept' | 50 | type: 'Accept' |
51 | } | 51 | } |
52 | |||
53 | export 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 | } |