Use sensitive instead of nsfw in activitypub
This commit is contained in:
parent
4ba3b8ea1b
commit
0a67e28bee
5 changed files with 5 additions and 5 deletions
|
@ -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',
|
||||||
|
|
|
@ -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) &&
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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(),
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue