mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 02:09:37 +02:00
Add follow tests
This commit is contained in:
parent
81de19482b
commit
0f91ae62df
23 changed files with 736 additions and 522 deletions
|
@ -3,14 +3,14 @@ import { VideoAbuseObject } from '../../../../shared/models/activitypub/objects/
|
|||
import { logger, retryTransactionWrapper } from '../../../helpers'
|
||||
import { database as db } from '../../../initializers'
|
||||
import { AccountInstance } from '../../../models/account/account-interface'
|
||||
import { getOrCreateAccount } from '../account'
|
||||
import { getOrCreateAccountAndServer } from '../account'
|
||||
import { getVideoChannelActivityPubUrl } from '../url'
|
||||
import { videoChannelActivityObjectToDBAttributes } from './misc'
|
||||
|
||||
async function processCreateActivity (activity: ActivityCreate) {
|
||||
const activityObject = activity.object
|
||||
const activityType = activityObject.type
|
||||
const account = await getOrCreateAccount(activity.actor)
|
||||
const account = await getOrCreateAccountAndServer(activity.actor)
|
||||
|
||||
if (activityType === 'VideoChannel') {
|
||||
return processCreateVideoChannel(account, activityObject as VideoChannelObject)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue