diff options
author | Chocobozzz <me@florianbigard.com> | 2023-06-05 16:18:57 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2023-06-29 10:18:00 +0200 |
commit | 7f7e9d4e904fed9233f84089e3b2ea60ab8740f7 (patch) | |
tree | 7407ae25a483e3e8b43443a6bbdceb067b5db8e5 /shared/models | |
parent | cefe22cf7c5286af1eb0e7a19937e741e2c2f58a (diff) | |
download | PeerTube-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.ts | 5 | ||||
-rw-r--r-- | shared/models/activitypub/objects/playlist-object.ts | 4 | ||||
-rw-r--r-- | shared/models/activitypub/objects/video-comment-object.ts | 4 |
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 | ||
117 | export interface ActivityPubAttributedTo { | 117 | export type ActivityPubAttributedTo = { type: 'Group' | 'Person', id: string } | string |
118 | type: 'Group' | 'Person' | ||
119 | id: string | ||
120 | } | ||
121 | 118 | ||
122 | export interface ActivityTombstoneObject { | 119 | export 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 @@ | |||
1 | import { ActivityIconObject } from './common-objects' | 1 | import { ActivityIconObject, ActivityPubAttributedTo } from './common-objects' |
2 | 2 | ||
3 | export interface PlaylistObject { | 3 | export 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 @@ | |||
1 | import { ActivityTagObject } from './common-objects' | 1 | import { ActivityPubAttributedTo, ActivityTagObject } from './common-objects' |
2 | 2 | ||
3 | export interface VideoCommentObject { | 3 | export 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 | } |