Skip to content

ActivityPub-federated video streaming platform using P2P directly in your web browser

Add missing mediaType info to AP objects

Chocobozzz3726c3725506
diff --git a/server/models/abuse/abuse.ts b/server/models/abuse/abuse.ts
index 4344df006e..f85f48e86b 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>>> {
return {
type: 'Flag' as 'Flag',
content: this.reason,
+ mediaType: 'text/markdown',
object,
tag: predefinedReasons.map(r => ({
type: 'Hashtag' as 'Hashtag',
diff --git a/server/models/video/video-comment.ts b/server/models/video/video-comment.ts
index 7f28b86b45..fa77455bc8 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
return {
type: 'Note' as 'Note',
id: this.url,
+
content: this.text,
+ mediaType: 'text/markdown',
+
inReplyTo,
updated: this.updatedAt.toISOString(),
published: this.createdAt.toISOString(),
diff --git a/server/models/video/video-playlist.ts b/server/models/video/video-playlist.ts
index 0d43c795e3..c125db3ff9 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
type: 'Playlist' as 'Playlist',
name: this.name,
content: this.description,
+ mediaType: 'text/markdown' as 'text/markdown',
uuid: this.uuid,
published: this.createdAt.toISOString(),
updated: this.updatedAt.toISOString(),
diff --git a/shared/models/activitypub/objects/abuse-object.ts b/shared/models/activitypub/objects/abuse-object.ts
index ad45cc064e..d938b86933 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'
export interface AbuseObject {
type: 'Flag'
+
content: string
+ mediaType: 'text/markdown'
+
object: string | string[]
tag?: ActivityFlagReasonObject[]
diff --git a/shared/models/activitypub/objects/playlist-object.ts b/shared/models/activitypub/objects/playlist-object.ts
index b561d8efd9..842c037909 100644
--- a/shared/models/activitypub/objects/playlist-object.ts
+++ b/shared/models/activitypub/objects/playlist-object.ts
@@ -5,7 +5,10 @@ export interface PlaylistObject {
type: 'Playlist'
name: string
+
content: string
+ mediaType: 'text/markdown'
+
uuid: string
totalItems: number
diff --git a/shared/models/activitypub/objects/video-comment-object.ts b/shared/models/activitypub/objects/video-comment-object.ts
index 1c058b86ca..ba90017307 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'
export interface VideoCommentObject {
type: 'Note'
id: string
+
content: string
+ mediaType: 'text/markdown'
+
inReplyTo: string
published: string
updated: string
diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.ts
index bfbcfb1a52..9faa3bb879 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 {
published: string
originallyPublishedAt: string
updated: string
+
mediaType: 'text/markdown'
content: string
+
support: string
icon: ActivityIconObject[]