aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-06-05 16:18:57 +0200
committerChocobozzz <me@florianbigard.com>2023-06-29 10:18:00 +0200
commit7f7e9d4e904fed9233f84089e3b2ea60ab8740f7 (patch)
tree7407ae25a483e3e8b43443a6bbdceb067b5db8e5 /shared/models
parentcefe22cf7c5286af1eb0e7a19937e741e2c2f58a (diff)
downloadPeerTube-7f7e9d4e904fed9233f84089e3b2ea60ab8740f7.tar.gz
PeerTube-7f7e9d4e904fed9233f84089e3b2ea60ab8740f7.tar.zst
PeerTube-7f7e9d4e904fed9233f84089e3b2ea60ab8740f7.zip
Handle correctly formatted AP attributedTo
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/activitypub/objects/common-objects.ts5
-rw-r--r--shared/models/activitypub/objects/playlist-object.ts4
-rw-r--r--shared/models/activitypub/objects/video-comment-object.ts4
3 files changed, 5 insertions, 8 deletions
diff --git a/shared/models/activitypub/objects/common-objects.ts b/shared/models/activitypub/objects/common-objects.ts
index 9bf994379..db9c73658 100644
--- a/shared/models/activitypub/objects/common-objects.ts
+++ b/shared/models/activitypub/objects/common-objects.ts
@@ -114,10 +114,7 @@ export type ActivityUrlObject =
114 | ActivityVideoFileMetadataUrlObject 114 | ActivityVideoFileMetadataUrlObject
115 | ActivityTrackerUrlObject 115 | ActivityTrackerUrlObject
116 116
117export interface ActivityPubAttributedTo { 117export type ActivityPubAttributedTo = { type: 'Group' | 'Person', id: string } | string
118 type: 'Group' | 'Person'
119 id: string
120}
121 118
122export interface ActivityTombstoneObject { 119export interface ActivityTombstoneObject {
123 '@context'?: any 120 '@context'?: any
diff --git a/shared/models/activitypub/objects/playlist-object.ts b/shared/models/activitypub/objects/playlist-object.ts
index 842c03790..0ccb71828 100644
--- a/shared/models/activitypub/objects/playlist-object.ts
+++ b/shared/models/activitypub/objects/playlist-object.ts
@@ -1,4 +1,4 @@
1import { ActivityIconObject } from './common-objects' 1import { ActivityIconObject, ActivityPubAttributedTo } from './common-objects'
2 2
3export interface PlaylistObject { 3export interface PlaylistObject {
4 id: string 4 id: string
@@ -12,7 +12,7 @@ export interface PlaylistObject {
12 uuid: string 12 uuid: string
13 13
14 totalItems: number 14 totalItems: number
15 attributedTo: string[] 15 attributedTo: ActivityPubAttributedTo[]
16 16
17 icon?: ActivityIconObject 17 icon?: ActivityIconObject
18 18
diff --git a/shared/models/activitypub/objects/video-comment-object.ts b/shared/models/activitypub/objects/video-comment-object.ts
index ba9001730..fb1e6f8db 100644
--- a/shared/models/activitypub/objects/video-comment-object.ts
+++ b/shared/models/activitypub/objects/video-comment-object.ts
@@ -1,4 +1,4 @@
1import { ActivityTagObject } from './common-objects' 1import { ActivityPubAttributedTo, ActivityTagObject } from './common-objects'
2 2
3export interface VideoCommentObject { 3export interface VideoCommentObject {
4 type: 'Note' 4 type: 'Note'
@@ -11,6 +11,6 @@ export interface VideoCommentObject {
11 published: string 11 published: string
12 updated: string 12 updated: string
13 url: string 13 url: string
14 attributedTo: string 14 attributedTo: ActivityPubAttributedTo
15 tag: ActivityTagObject[] 15 tag: ActivityTagObject[]
16} 16}