aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/activitypub/process/process-add.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-11-21 13:43:29 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-11-27 19:40:52 +0100
commit0f91ae62df8a37194fea84ce1efa9e733d9c1fd8 (patch)
tree1cb0fccadebb629d02632dc8e21fae7ba521c464 /server/lib/activitypub/process/process-add.ts
parent81de19482b89342c3dbc098a9f512ef7f1056e45 (diff)
downloadPeerTube-0f91ae62df8a37194fea84ce1efa9e733d9c1fd8.tar.gz
PeerTube-0f91ae62df8a37194fea84ce1efa9e733d9c1fd8.tar.zst
PeerTube-0f91ae62df8a37194fea84ce1efa9e733d9c1fd8.zip
Add follow tests
Diffstat (limited to 'server/lib/activitypub/process/process-add.ts')
-rw-r--r--server/lib/activitypub/process/process-add.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/process/process-add.ts b/server/lib/activitypub/process/process-add.ts
index 281036228..edc90dee5 100644
--- a/server/lib/activitypub/process/process-add.ts
+++ b/server/lib/activitypub/process/process-add.ts
@@ -6,7 +6,7 @@ import { logger } from '../../../helpers/logger'
6import { database as db } from '../../../initializers' 6import { database as db } from '../../../initializers'
7import { AccountInstance } from '../../../models/account/account-interface' 7import { AccountInstance } from '../../../models/account/account-interface'
8import { VideoChannelInstance } from '../../../models/video/video-channel-interface' 8import { VideoChannelInstance } from '../../../models/video/video-channel-interface'
9import { getOrCreateAccount } from '../account' 9import { getOrCreateAccountAndServer } from '../account'
10import { getOrCreateVideoChannel } from '../video-channels' 10import { getOrCreateVideoChannel } from '../video-channels'
11import { generateThumbnailFromUrl } from '../videos' 11import { generateThumbnailFromUrl } from '../videos'
12import { videoActivityObjectToDBAttributes, videoFileActivityUrlToDBAttributes } from './misc' 12import { videoActivityObjectToDBAttributes, videoFileActivityUrlToDBAttributes } from './misc'
@@ -14,7 +14,7 @@ import { videoActivityObjectToDBAttributes, videoFileActivityUrlToDBAttributes }
14async function processAddActivity (activity: ActivityAdd) { 14async function processAddActivity (activity: ActivityAdd) {
15 const activityObject = activity.object 15 const activityObject = activity.object
16 const activityType = activityObject.type 16 const activityType = activityObject.type
17 const account = await getOrCreateAccount(activity.actor) 17 const account = await getOrCreateAccountAndServer(activity.actor)
18 18
19 if (activityType === 'Video') { 19 if (activityType === 'Video') {
20 const videoChannelUrl = activity.target 20 const videoChannelUrl = activity.target