From 16b90975941b78d01d7202d441bf731a10048c16 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 23 Nov 2017 16:55:13 +0100 Subject: Fetch video likes/dislikes too --- shared/models/activitypub/activitypub-ordered-collection.ts | 4 ++-- shared/models/activitypub/activitypub-root.ts | 2 +- shared/models/activitypub/objects/video-torrent-object.ts | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'shared') diff --git a/shared/models/activitypub/activitypub-ordered-collection.ts b/shared/models/activitypub/activitypub-ordered-collection.ts index 4080fd740..487d8cee0 100644 --- a/shared/models/activitypub/activitypub-ordered-collection.ts +++ b/shared/models/activitypub/activitypub-ordered-collection.ts @@ -1,9 +1,9 @@ import { Activity } from './activity' -export interface ActivityPubOrderedCollection { +export interface ActivityPubOrderedCollection { '@context': string[] type: 'OrderedCollection' | 'OrderedCollectionPage' totalItems: number partOf?: string - orderedItems: Activity[] + orderedItems: T[] } diff --git a/shared/models/activitypub/activitypub-root.ts b/shared/models/activitypub/activitypub-root.ts index 6a67f3101..22dff83a2 100644 --- a/shared/models/activitypub/activitypub-root.ts +++ b/shared/models/activitypub/activitypub-root.ts @@ -2,4 +2,4 @@ import { Activity } from './activity' import { ActivityPubCollection } from './activitypub-collection' import { ActivityPubOrderedCollection } from './activitypub-ordered-collection' -export type RootActivity = Activity | ActivityPubCollection | ActivityPubOrderedCollection +export type RootActivity = Activity | ActivityPubCollection | ActivityPubOrderedCollection diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts index ae8f807c8..a4e032d04 100644 --- a/shared/models/activitypub/objects/video-torrent-object.ts +++ b/shared/models/activitypub/objects/video-torrent-object.ts @@ -4,6 +4,7 @@ import { ActivityTagObject, ActivityUrlObject } from './common-objects' +import { ActivityPubOrderedCollection } from '../activitypub-ordered-collection' export interface VideoTorrentObject { type: 'Video' @@ -24,4 +25,6 @@ export interface VideoTorrentObject { icon: ActivityIconObject url: ActivityUrlObject[] actor?: string + likes?: ActivityPubOrderedCollection + dislikes?: ActivityPubOrderedCollection } -- cgit v1.2.3