Use sensitive instead of nsfw in activitypub
This commit is contained in:
parent
4ba3b8ea1b
commit
0a67e28bee
|
@ -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',
|
||||
|
|
|
@ -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) &&
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -17,7 +17,7 @@ export interface VideoTorrentObject {
|
|||
licence: ActivityIdentifierObject
|
||||
language: ActivityIdentifierObject
|
||||
views: number
|
||||
nsfw: boolean
|
||||
sensitive: boolean
|
||||
commentsEnabled: boolean
|
||||
published: string
|
||||
updated: string
|
||||
|
|
Loading…
Reference in New Issue