Use sensitive instead of nsfw in activitypub

pull/267/head
Chocobozzz 2018-01-26 17:25:35 +01:00
parent 4ba3b8ea1b
commit 0a67e28bee
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
5 changed files with 5 additions and 5 deletions

View File

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

View File

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

View File

@ -91,7 +91,7 @@ async function videoActivityObjectToDBAttributes (videoChannel: VideoChannelMode
licence,
language,
description,
nsfw: videoObject.nsfw,
nsfw: videoObject.sensitive,
commentsEnabled: videoObject.commentsEnabled,
channelId: videoChannel.id,
duration: parseInt(duration, 10),

View File

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

View File

@ -17,7 +17,7 @@ export interface VideoTorrentObject {
licence: ActivityIdentifierObject
language: ActivityIdentifierObject
views: number
nsfw: boolean
sensitive: boolean
commentsEnabled: boolean
published: string
updated: string