Browse Source

Add missing mediaType info to AP objects

pull/4723/head
Chocobozzz 1 week ago
parent
commit
3726c37255
No known key found for this signature in database GPG Key ID: 583A612D890159BE
7 changed files with 16 additions and 0 deletions
  1. +1
    -0
      server/models/abuse/abuse.ts
  2. +3
    -0
      server/models/video/video-comment.ts
  3. +1
    -0
      server/models/video/video-playlist.ts
  4. +3
    -0
      shared/models/activitypub/objects/abuse-object.ts
  5. +3
    -0
      shared/models/activitypub/objects/playlist-object.ts
  6. +3
    -0
      shared/models/activitypub/objects/video-comment-object.ts
  7. +2
    -0
      shared/models/activitypub/objects/video-torrent-object.ts

+ 1
- 0
server/models/abuse/abuse.ts View File

@@ -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',


+ 3
- 0
server/models/video/video-comment.ts View File

@@ -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(),


+ 1
- 0
server/models/video/video-playlist.ts View File

@@ -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(),


+ 3
- 0
shared/models/activitypub/objects/abuse-object.ts View File

@@ -2,7 +2,10 @@ import { ActivityFlagReasonObject } from './common-objects'

export interface AbuseObject {
type: 'Flag'

content: string
mediaType: 'text/markdown'

object: string | string[]

tag?: ActivityFlagReasonObject[]


+ 3
- 0
shared/models/activitypub/objects/playlist-object.ts View File

@@ -5,7 +5,10 @@ export interface PlaylistObject {
type: 'Playlist'

name: string

content: string
mediaType: 'text/markdown'

uuid: string

totalItems: number


+ 3
- 0
shared/models/activitypub/objects/video-comment-object.ts View File

@@ -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


+ 2
- 0
shared/models/activitypub/objects/video-torrent-object.ts View File

@@ -33,8 +33,10 @@ export interface VideoObject {
published: string
originallyPublishedAt: string
updated: string

mediaType: 'text/markdown'
content: string

support: string

icon: ActivityIconObject[]


Loading…
Cancel
Save