ActivityPub-federated video streaming platform using P2P directly in your web browser
Use sensitive instead of nsfw in activitypub
Chocobozzz0a67e28beeaf
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.tsindex a19726beb4..97115680cd 100644--- a/server/helpers/activitypub.ts+++ b/server/helpers/activitypub.ts@@ -15,7 +15,7 @@ function activityPubContextify <T> (data: T) {'uuid': 'http://schema.org/identifier','category': 'http://schema.org/category','licence': 'http://schema.org/license',- 'nsfw': 'as:sensitive',+ 'sensitive': 'as:sensitive','language': 'http://schema.org/inLanguage','views': 'http://schema.org/Number','size': 'http://schema.org/Number',diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.tsindex 5d2a1f1713..10588423a9 100644--- a/server/helpers/custom-validators/activitypub/videos.ts+++ b/server/helpers/custom-validators/activitypub/videos.ts@@ -52,7 +52,7 @@ function isVideoTorrentObjectValid (video: any) {(!video.licence || isRemoteIdentifierValid(video.licence)) &&(!video.language || isRemoteIdentifierValid(video.language)) &&isVideoViewsValid(video.views) &&- isBooleanValid(video.nsfw) &&+ isBooleanValid(video.sensitive) &&isBooleanValid(video.commentsEnabled) &&isDateValid(video.published) &&isDateValid(video.updated) &&diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.tsindex 7d535bb0ac..c9c4674d94 100644--- a/server/lib/activitypub/videos.ts+++ b/server/lib/activitypub/videos.ts@@ -91,7 +91,7 @@ async function videoActivityObjectToDBAttributes (videoChannel: VideoChannelModelicence,language,description,- nsfw: videoObject.nsfw,+ nsfw: videoObject.sensitive,commentsEnabled: videoObject.commentsEnabled,channelId: videoChannel.id,duration: parseInt(duration, 10),diff --git a/server/models/video/video.ts b/server/models/video/video.tsindex bd834b088b..8e1acdd44e 100644--- a/server/models/video/video.ts+++ b/server/models/video/video.ts@@ -1027,7 +1027,7 @@ export class VideoModel extends Model<VideoModel> {licence,language,views: this.views,- nsfw: this.nsfw,+ sensitive: this.nsfw,commentsEnabled: this.commentsEnabled,published: this.createdAt.toISOString(),updated: this.updatedAt.toISOString(),diff --git a/shared/models/activitypub/objects/video-torrent-object.ts b/shared/models/activitypub/objects/video-torrent-object.tsindex d3b5f7c263..6f03bf7d0f 100644--- a/shared/models/activitypub/objects/video-torrent-object.ts+++ b/shared/models/activitypub/objects/video-torrent-object.ts@@ -17,7 +17,7 @@ export interface VideoTorrentObject {licence: ActivityIdentifierObjectlanguage: ActivityIdentifierObjectviews: number- nsfw: boolean+ sensitive: booleancommentsEnabled: booleanpublished: stringupdated: string