diff options
author | Chocobozzz <me@florianbigard.com> | 2022-01-13 14:12:29 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-01-13 14:16:32 +0100 |
commit | 3726c3725506d0f8a26ded34f42d7bcfb5d0e639 (patch) | |
tree | 1e4ce0d16a0ec4acf6f63ddb4aec6f6f143218d4 | |
parent | 696b45deb63bc9f36da9c9ee55c5d4a3a883b87e (diff) | |
download | PeerTube-3726c3725506d0f8a26ded34f42d7bcfb5d0e639.tar.gz PeerTube-3726c3725506d0f8a26ded34f42d7bcfb5d0e639.tar.zst PeerTube-3726c3725506d0f8a26ded34f42d7bcfb5d0e639.zip |
Add missing mediaType info to AP objects
-rw-r--r-- | server/models/abuse/abuse.ts | 1 | ||||
-rw-r--r-- | server/models/video/video-comment.ts | 3 | ||||
-rw-r--r-- | server/models/video/video-playlist.ts | 1 | ||||
-rw-r--r-- | shared/models/activitypub/objects/abuse-object.ts | 3 | ||||
-rw-r--r-- | shared/models/activitypub/objects/playlist-object.ts | 3 | ||||
-rw-r--r-- | shared/models/activitypub/objects/video-comment-object.ts | 3 | ||||
-rw-r--r-- | shared/models/activitypub/objects/video-torrent-object.ts | 2 |
7 files changed, 16 insertions, 0 deletions
diff --git a/server/models/abuse/abuse.ts b/server/models/abuse/abuse.ts index 4344df006..f85f48e86 100644 --- a/server/models/abuse/abuse.ts +++ b/server/models/abuse/abuse.ts | |||
@@ -563,6 +563,7 @@ export class AbuseModel extends Model<Partial<AttributesOnly<AbuseModel>>> { | |||
563 | return { | 563 | return { |
564 | type: 'Flag' as 'Flag', | 564 | type: 'Flag' as 'Flag', |
565 | content: this.reason, | 565 | content: this.reason, |
566 | mediaType: 'text/markdown', | ||
566 | object, | 567 | object, |
567 | tag: predefinedReasons.map(r => ({ | 568 | tag: predefinedReasons.map(r => ({ |
568 | type: 'Hashtag' as 'Hashtag', | 569 | type: 'Hashtag' as 'Hashtag', |
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts index 7f28b86b4..fa77455bc 100644 --- a/server/models/video/video-comment.ts +++ b/server/models/video/video-comment.ts | |||
@@ -874,7 +874,10 @@ export class VideoCommentModel extends Model<Partial<AttributesOnly<VideoComment | |||
874 | return { | 874 | return { |
875 | type: 'Note' as 'Note', | 875 | type: 'Note' as 'Note', |
876 | id: this.url, | 876 | id: this.url, |
877 | |||
877 | content: this.text, | 878 | content: this.text, |
879 | mediaType: 'text/markdown', | ||
880 | |||
878 | inReplyTo, | 881 | inReplyTo, |
879 | updated: this.updatedAt.toISOString(), | 882 | updated: this.updatedAt.toISOString(), |
880 | published: this.createdAt.toISOString(), | 883 | published: this.createdAt.toISOString(), |
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts index 0d43c795e..c125db3ff 100644 --- a/server/models/video/video-playlist.ts +++ b/server/models/video/video-playlist.ts | |||
@@ -679,6 +679,7 @@ export class VideoPlaylistModel extends Model<Partial<AttributesOnly<VideoPlayli | |||
679 | type: 'Playlist' as 'Playlist', | 679 | type: 'Playlist' as 'Playlist', |
680 | name: this.name, | 680 | name: this.name, |
681 | content: this.description, | 681 | content: this.description, |
682 | mediaType: 'text/markdown' as 'text/markdown', | ||
682 | uuid: this.uuid, | 683 | uuid: this.uuid, |
683 | published: this.createdAt.toISOString(), | 684 | published: this.createdAt.toISOString(), |
684 | updated: this.updatedAt.toISOString(), | 685 | updated: this.updatedAt.toISOString(), |
diff --git a/shared/models/activitypub/objects/abuse-object.ts b/shared/models/activitypub/objects/abuse-object.ts index ad45cc064..d938b8693 100644 --- a/shared/models/activitypub/objects/abuse-object.ts +++ b/shared/models/activitypub/objects/abuse-object.ts | |||
@@ -2,7 +2,10 @@ import { ActivityFlagReasonObject } from './common-objects' | |||
2 | 2 | ||
3 | export interface AbuseObject { | 3 | export interface AbuseObject { |
4 | type: 'Flag' | 4 | type: 'Flag' |
5 | |||
5 | content: string | 6 | content: string |
7 | mediaType: 'text/markdown' | ||
8 | |||
6 | object: string | string[] | 9 | object: string | string[] |
7 | 10 | ||
8 | tag?: ActivityFlagReasonObject[] | 11 | tag?: ActivityFlagReasonObject[] |
diff --git a/shared/models/activitypub/objects/playlist-object.ts b/shared/models/activitypub/objects/playlist-object.ts index b561d8efd..842c03790 100644 --- a/shared/models/activitypub/objects/playlist-object.ts +++ b/shared/models/activitypub/objects/playlist-object.ts | |||
@@ -5,7 +5,10 @@ export interface PlaylistObject { | |||
5 | type: 'Playlist' | 5 | type: 'Playlist' |
6 | 6 | ||
7 | name: string | 7 | name: string |
8 | |||
8 | content: string | 9 | content: string |
10 | mediaType: 'text/markdown' | ||
11 | |||
9 | uuid: string | 12 | uuid: string |
10 | 13 | ||
11 | totalItems: number | 14 | totalItems: number |
diff --git a/shared/models/activitypub/objects/video-comment-object.ts b/shared/models/activitypub/objects/video-comment-object.ts index 1c058b86c..ba9001730 100644 --- a/shared/models/activitypub/objects/video-comment-object.ts +++ b/shared/models/activitypub/objects/video-comment-object.ts | |||
@@ -3,7 +3,10 @@ import { ActivityTagObject } from './common-objects' | |||
3 | export interface VideoCommentObject { | 3 | export interface VideoCommentObject { |
4 | type: 'Note' | 4 | type: 'Note' |
5 | id: string | 5 | id: string |
6 | |||
6 | content: string | 7 | content: string |
8 | mediaType: 'text/markdown' | ||
9 | |||
7 | inReplyTo: string | 10 | inReplyTo: string |
8 | published: string | 11 | published: string |
9 | updated: string | 12 | updated: string |
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts index bfbcfb1a5..9faa3bb87 100644 --- a/shared/models/activitypub/objects/video-torrent-object.ts +++ b/shared/models/activitypub/objects/video-torrent-object.ts | |||
@@ -33,8 +33,10 @@ export interface VideoObject { | |||
33 | published: string | 33 | published: string |
34 | originallyPublishedAt: string | 34 | originallyPublishedAt: string |
35 | updated: string | 35 | updated: string |
36 | |||
36 | mediaType: 'text/markdown' | 37 | mediaType: 'text/markdown' |
37 | content: string | 38 | content: string |
39 | |||
38 | support: string | 40 | support: string |
39 | 41 | ||
40 | icon: ActivityIconObject[] | 42 | icon: ActivityIconObject[] |