From 40ff57078e15d5b86ee6b71e198b95d3feb78eaf Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 22 Nov 2017 16:25:03 +0100 Subject: Federate video views --- shared/models/activitypub/activity.ts | 5 +++-- shared/models/activitypub/objects/index.ts | 1 + shared/models/activitypub/objects/view-object.ts | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 shared/models/activitypub/objects/view-object.ts (limited to 'shared/models') 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 @@ -import { VideoChannelObject, VideoTorrentObject } from './objects' import { ActivityPubSignature } from './activitypub-signature' +import { VideoChannelObject, VideoTorrentObject } from './objects' import { VideoAbuseObject } from './objects/video-abuse-object' +import { ViewObject } from './objects/view-object' export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce | @@ -20,7 +21,7 @@ export interface BaseActivity { export interface ActivityCreate extends BaseActivity { type: 'Create' - object: VideoChannelObject | VideoAbuseObject + object: VideoChannelObject | VideoAbuseObject | ViewObject } 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' export * from './video-abuse-object' export * from './video-channel-object' export * from './video-torrent-object' +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 @@ +export interface ViewObject { + type: 'View', + actor: string + object: string +} -- cgit v1.2.3