diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-11-23 14:19:55 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-11-27 19:40:53 +0100 |
commit | 0032ebe94aa83fab761c7de3ceb6210ac4532824 (patch) | |
tree | 3ea407d7ea6de4c7f7bc66caba7e23c0cc4036e3 /shared/models/activitypub/activity.ts | |
parent | d52eb8f656242c7e34afdb2dee681861fb9bce35 (diff) | |
download | PeerTube-0032ebe94aa83fab761c7de3ceb6210ac4532824.tar.gz PeerTube-0032ebe94aa83fab761c7de3ceb6210ac4532824.tar.zst PeerTube-0032ebe94aa83fab761c7de3ceb6210ac4532824.zip |
Federate likes/dislikes
Diffstat (limited to 'shared/models/activitypub/activity.ts')
-rw-r--r-- | shared/models/activitypub/activity.ts | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/shared/models/activitypub/activity.ts b/shared/models/activitypub/activity.ts index ce150bc12..cbfd6157a 100644 --- a/shared/models/activitypub/activity.ts +++ b/shared/models/activitypub/activity.ts | |||
@@ -1,13 +1,14 @@ | |||
1 | import { ActivityPubSignature } from './activitypub-signature' | 1 | import { ActivityPubSignature } from './activitypub-signature' |
2 | import { VideoChannelObject, VideoTorrentObject } from './objects' | 2 | import { VideoChannelObject, VideoTorrentObject } from './objects' |
3 | import { DislikeObject } from './objects/dislike-object' | ||
3 | import { VideoAbuseObject } from './objects/video-abuse-object' | 4 | import { VideoAbuseObject } from './objects/video-abuse-object' |
4 | import { ViewObject } from './objects/view-object' | 5 | import { ViewObject } from './objects/view-object' |
5 | 6 | ||
6 | export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | | 7 | export type Activity = ActivityCreate | ActivityAdd | ActivityUpdate | |
7 | ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce | | 8 | ActivityDelete | ActivityFollow | ActivityAccept | ActivityAnnounce | |
8 | ActivityUndo | 9 | ActivityUndo | ActivityLike |
9 | 10 | ||
10 | export type ActivityType = 'Create' | 'Add' | 'Update' | 'Delete' | 'Follow' | 'Accept' | 'Announce' | 'Undo' | 11 | export type ActivityType = 'Create' | 'Add' | 'Update' | 'Delete' | 'Follow' | 'Accept' | 'Announce' | 'Undo' | 'Like' |
11 | 12 | ||
12 | export interface BaseActivity { | 13 | export interface BaseActivity { |
13 | '@context'?: any[] | 14 | '@context'?: any[] |
@@ -21,7 +22,7 @@ export interface BaseActivity { | |||
21 | 22 | ||
22 | export interface ActivityCreate extends BaseActivity { | 23 | export interface ActivityCreate extends BaseActivity { |
23 | type: 'Create' | 24 | type: 'Create' |
24 | object: VideoChannelObject | VideoAbuseObject | ViewObject | 25 | object: VideoChannelObject | VideoAbuseObject | ViewObject | DislikeObject |
25 | } | 26 | } |
26 | 27 | ||
27 | export interface ActivityAdd extends BaseActivity { | 28 | export interface ActivityAdd extends BaseActivity { |
@@ -55,5 +56,10 @@ export interface ActivityAnnounce extends BaseActivity { | |||
55 | 56 | ||
56 | export interface ActivityUndo extends BaseActivity { | 57 | export interface ActivityUndo extends BaseActivity { |
57 | type: 'Undo', | 58 | type: 'Undo', |
58 | object: ActivityFollow | 59 | object: ActivityFollow | ActivityLike | ActivityCreate |
60 | } | ||
61 | |||
62 | export interface ActivityLike extends BaseActivity { | ||
63 | type: 'Like', | ||
64 | object: string | ||
59 | } | 65 | } |