]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/activitypub/activity.ts
Refractor and optimize AP collections
[github/Chocobozzz/PeerTube.git] / shared / models / activitypub / activity.ts
index aa25db4467065a21003912ae02b8cecb90eaf7d1..46e883e5f081d7a5a5a7dae888ab1b01e3919113 100644 (file)
@@ -22,7 +22,7 @@ export interface BaseActivity {
   id: string
   to?: string[]
   cc?: string[]
-  actor: string
+  actor: string | ActivityPubActor
   type: ActivityType
   signature?: ActivityPubSignature
 }
@@ -59,12 +59,12 @@ export interface ActivityReject extends BaseActivity {
 
 export interface ActivityAnnounce extends BaseActivity {
   type: 'Announce'
-  object: ActivityCreate | string
+  object: string | { id: string }
 }
 
 export interface ActivityUndo extends BaseActivity {
   type: 'Undo',
-  object: ActivityFollow | ActivityLike | ActivityCreate
+  object: ActivityFollow | ActivityLike | ActivityCreate | ActivityAnnounce
 }
 
 export interface ActivityLike extends BaseActivity {