aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-08 17:31:21 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-08 17:31:21 +0100
commitf595d3947708114deeed4312cc5ffd285745b090 (patch)
treee2fef8fae4e9d9ee6039ea2ab53eb20d11002969 /server/lib/activitypub
parente600e1fea275c12f4420e23624804617e61a082c (diff)
downloadPeerTube-f595d3947708114deeed4312cc5ffd285745b090.tar.gz
PeerTube-f595d3947708114deeed4312cc5ffd285745b090.tar.zst
PeerTube-f595d3947708114deeed4312cc5ffd285745b090.zip
Finish admin design
Diffstat (limited to 'server/lib/activitypub')
-rw-r--r--server/lib/activitypub/process/misc.ts21
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),