diff options
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r-- | server/lib/activitypub/process/misc.ts | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/server/lib/activitypub/process/misc.ts b/server/lib/activitypub/process/misc.ts index f20e588ab..0baa22c26 100644 --- a/server/lib/activitypub/process/misc.ts +++ b/server/lib/activitypub/process/misc.ts | |||
@@ -41,15 +41,30 @@ async function videoActivityObjectToDBAttributes ( | |||
41 | language = parseInt(videoObject.language.identifier, 10) | 41 | language = parseInt(videoObject.language.identifier, 10) |
42 | } | 42 | } |
43 | 43 | ||
44 | let category = null | ||
45 | if (videoObject.category) { | ||
46 | category = parseInt(videoObject.category.identifier, 10) | ||
47 | } | ||
48 | |||
49 | let licence = null | ||
50 | if (videoObject.licence) { | ||
51 | licence = parseInt(videoObject.licence.identifier, 10) | ||
52 | } | ||
53 | |||
54 | let description = null | ||
55 | if (videoObject.content) { | ||
56 | description = videoObject.content | ||
57 | } | ||
58 | |||
44 | const videoData: VideoAttributes = { | 59 | const videoData: VideoAttributes = { |
45 | name: videoObject.name, | 60 | name: videoObject.name, |
46 | uuid: videoObject.uuid, | 61 | uuid: videoObject.uuid, |
47 | url: videoObject.id, | 62 | url: videoObject.id, |
48 | category: parseInt(videoObject.category.identifier, 10), | 63 | category, |
49 | licence: parseInt(videoObject.licence.identifier, 10), | 64 | licence, |
50 | language, | 65 | language, |
66 | description, | ||
51 | nsfw: videoObject.nsfw, | 67 | nsfw: videoObject.nsfw, |
52 | description: videoObject.content, | ||
53 | channelId: videoChannel.id, | 68 | channelId: videoChannel.id, |
54 | duration: parseInt(duration, 10), | 69 | duration: parseInt(duration, 10), |
55 | createdAt: new Date(videoObject.published), | 70 | createdAt: new Date(videoObject.published), |