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', 'uuid': 'http://schema.org/identifier',
'category': 'http://schema.org/category', 'category': 'http://schema.org/category',
'licence': 'http://schema.org/license', 'licence': 'http://schema.org/license',
'nsfw': 'as:sensitive', 'sensitive': 'as:sensitive',
'language': 'http://schema.org/inLanguage', 'language': 'http://schema.org/inLanguage',
'views': 'http://schema.org/Number', 'views': 'http://schema.org/Number',
'size': '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.licence || isRemoteIdentifierValid(video.licence)) &&
(!video.language || isRemoteIdentifierValid(video.language)) && (!video.language || isRemoteIdentifierValid(video.language)) &&
isVideoViewsValid(video.views) && isVideoViewsValid(video.views) &&
isBooleanValid(video.nsfw) && isBooleanValid(video.sensitive) &&
isBooleanValid(video.commentsEnabled) && isBooleanValid(video.commentsEnabled) &&
isDateValid(video.published) && isDateValid(video.published) &&
isDateValid(video.updated) && isDateValid(video.updated) &&

View File

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

View File

@ -1027,7 +1027,7 @@ export class VideoModel extends Model<VideoModel> {
licence, licence,
language, language,
views: this.views, views: this.views,
nsfw: this.nsfw, sensitive: this.nsfw,
commentsEnabled: this.commentsEnabled, commentsEnabled: this.commentsEnabled,
published: this.createdAt.toISOString(), published: this.createdAt.toISOString(),
updated: this.updatedAt.toISOString(), updated: this.updatedAt.toISOString(),

View File

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