]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/abuse/abuse.ts
Merge branch 'release/4.3.0' into develop
[github/Chocobozzz/PeerTube.git] / server / models / abuse / abuse.ts
index 4344df006ebb810dbf42a74ce0aaeda2907df1e9..4c6a96a86d3f882c0afd06ca5035aa2118d8f3d9 100644 (file)
@@ -436,7 +436,7 @@ export class AbuseModel extends Model<Partial<AttributesOnly<AbuseModel>>> {
 
   buildBaseVideoCommentAbuse (this: MAbuseUserFormattable) {
     // Associated video comment could have been destroyed if the video has been deleted
-    if (!this.VideoCommentAbuse || !this.VideoCommentAbuse.VideoComment) return null
+    if (!this.VideoCommentAbuse?.VideoComment) return null
 
     const entity = this.VideoCommentAbuse.VideoComment
 
@@ -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',