aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-01-26 17:25:35 +0100
committerChocobozzz <me@florianbigard.com>2018-01-26 17:25:35 +0100
commit0a67e28beeaf603110d52df3eda400e60531b3a4 (patch)
treef2771c1d0de356cf163fb79b498b41b2b2cdad2c /server
parent4ba3b8ea1be85d95a508ac479f26b96ceea15971 (diff)
downloadPeerTube-0a67e28beeaf603110d52df3eda400e60531b3a4.tar.gz
PeerTube-0a67e28beeaf603110d52df3eda400e60531b3a4.tar.zst
PeerTube-0a67e28beeaf603110d52df3eda400e60531b3a4.zip
Use sensitive instead of nsfw in activitypub
Diffstat (limited to 'server')
-rw-r--r--server/helpers/activitypub.ts2
-rw-r--r--server/helpers/custom-validators/activitypub/videos.ts2
-rw-r--r--server/lib/activitypub/videos.ts2
-rw-r--r--server/models/video/video.ts2
4 files changed, 4 insertions, 4 deletions
diff --git a/server/helpers/activitypub.ts b/server/helpers/activitypub.ts
index a19726beb..97115680c 100644
--- a/server/helpers/activitypub.ts
+++ b/server/helpers/activitypub.ts
@@ -15,7 +15,7 @@ function activityPubContextify <T> (data: T) {
15 'uuid': 'http://schema.org/identifier', 15 'uuid': 'http://schema.org/identifier',
16 'category': 'http://schema.org/category', 16 'category': 'http://schema.org/category',
17 'licence': 'http://schema.org/license', 17 'licence': 'http://schema.org/license',
18 'nsfw': 'as:sensitive', 18 'sensitive': 'as:sensitive',
19 'language': 'http://schema.org/inLanguage', 19 'language': 'http://schema.org/inLanguage',
20 'views': 'http://schema.org/Number', 20 'views': 'http://schema.org/Number',
21 'size': 'http://schema.org/Number', 21 'size': 'http://schema.org/Number',
diff --git a/server/helpers/custom-validators/activitypub/videos.ts b/server/helpers/custom-validators/activitypub/videos.ts
index 5d2a1f171..10588423a 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) {
52 (!video.licence || isRemoteIdentifierValid(video.licence)) && 52 (!video.licence || isRemoteIdentifierValid(video.licence)) &&
53 (!video.language || isRemoteIdentifierValid(video.language)) && 53 (!video.language || isRemoteIdentifierValid(video.language)) &&
54 isVideoViewsValid(video.views) && 54 isVideoViewsValid(video.views) &&
55 isBooleanValid(video.nsfw) && 55 isBooleanValid(video.sensitive) &&
56 isBooleanValid(video.commentsEnabled) && 56 isBooleanValid(video.commentsEnabled) &&
57 isDateValid(video.published) && 57 isDateValid(video.published) &&
58 isDateValid(video.updated) && 58 isDateValid(video.updated) &&
diff --git a/server/lib/activitypub/videos.ts b/server/lib/activitypub/videos.ts
index 7d535bb0a..c9c4674d9 100644
--- a/server/lib/activitypub/videos.ts
+++ b/server/lib/activitypub/videos.ts
@@ -91,7 +91,7 @@ async function videoActivityObjectToDBAttributes (videoChannel: VideoChannelMode
91 licence, 91 licence,
92 language, 92 language,
93 description, 93 description,
94 nsfw: videoObject.nsfw, 94 nsfw: videoObject.sensitive,
95 commentsEnabled: videoObject.commentsEnabled, 95 commentsEnabled: videoObject.commentsEnabled,
96 channelId: videoChannel.id, 96 channelId: videoChannel.id,
97 duration: parseInt(duration, 10), 97 duration: parseInt(duration, 10),
diff --git a/server/models/video/video.ts b/server/models/video/video.ts
index bd834b088..8e1acdd44 100644
--- a/server/models/video/video.ts
+++ b/server/models/video/video.ts
@@ -1027,7 +1027,7 @@ export class VideoModel extends Model<VideoModel> {
1027 licence, 1027 licence,
1028 language, 1028 language,
1029 views: this.views, 1029 views: this.views,
1030 nsfw: this.nsfw, 1030 sensitive: this.nsfw,
1031 commentsEnabled: this.commentsEnabled, 1031 commentsEnabled: this.commentsEnabled,
1032 published: this.createdAt.toISOString(), 1032 published: this.createdAt.toISOString(),
1033 updated: this.updatedAt.toISOString(), 1033 updated: this.updatedAt.toISOString(),