diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-22 16:25:03 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | 40ff57078e15d5b86ee6b71e198b95d3feb78eaf (patch) | |
tree | 88031d4eac6a26597e8a1f2fc63674664e3eae26 /shared/models/activitypub | |
parent | c46edbc2f6ca310b2f0331f979ac6caf27f6eb92 (diff) | |
download | PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.tar.gz PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.tar.zst PeerTube-40ff57078e15d5b86ee6b71e198b95d3feb78eaf.zip |
Federate video views
Diffstat (limited to 'shared/models/activitypub')
-rw-r--r-- | shared/models/activitypub/activity.ts | 5 | ||||
-rw-r--r-- | shared/models/activitypub/objects/index.ts | 1 | ||||
-rw-r--r-- | shared/models/activitypub/objects/view-object.ts | 5 |
3 files changed, 9 insertions, 2 deletions
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts index 3d035d7d7..ce150bc12 100644 --- a/shared/models/activitypub/activity.ts +++ b/shared/models/activitypub/activity.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { VideoChannelObject, VideoTorrentObject } from './objects' | ||
2 | import { ActivityPubSignature } from './activitypub-signature' | 1 | import { ActivityPubSignature } from './activitypub-signature' |
2 | import { VideoChannelObject, VideoTorrentObject } from './objects' | ||
3 | import { VideoAbuseObject } from './objects/video-abuse-object' | 3 | import { VideoAbuseObject } from './objects/video-abuse-object' |
4 | import { ViewObject } from './objects/view-object' | ||
4 | 5 | ||
5 | export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | | 6 | export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | |
6 | ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce | | 7 | ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce | |
@@ -20,7 +21,7 @@ export interface BaseActivity { | |||
20 | 21 | ||
21 | export interface ActivityCreate extends BaseActivity { | 22 | export interface ActivityCreate extends BaseActivity { |
22 | type: 'Create' | 23 | type: 'Create' |
23 | object: VideoChannelObject | VideoAbuseObject | 24 | object: VideoChannelObject | VideoAbuseObject | ViewObject |
24 | } | 25 | } |
25 | 26 | ||
26 | export interface ActivityAdd extends BaseActivity { | 27 | export interface ActivityAdd extends BaseActivity { |
diff --git a/shared/models/activitypub/objects/index.ts b/shared/models/activitypub/objects/index.ts index cd772b28d..d92f772e2 100644 --- a/shared/models/activitypub/objects/index.ts +++ b/shared/models/activitypub/objects/index.ts | |||
@@ -2,3 +2,4 @@ export * from './common-objects' | |||
2 | export * from './video-abuse-object' | 2 | export * from './video-abuse-object' |
3 | export * from './video-channel-object' | 3 | export * from './video-channel-object' |
4 | export * from './video-torrent-object' | 4 | export * from './video-torrent-object' |
5 | export * from './view-object' | ||
diff --git a/shared/models/activitypub/objects/view-object.ts b/shared/models/activitypub/objects/view-object.ts new file mode 100644 index 000000000..00348116a --- /dev/null +++ b/shared/models/activitypub/objects/view-object.ts | |||
@@ -0,0 +1,5 @@ | |||
1 | export interface ViewObject { | ||
2 | type: 'View', | ||
3 | actor: string | ||
4 | object: string | ||
5 | } | ||