1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Add ability to search a video with an URL

This commit is contained in:
Chocobozzz 2018-08-22 11:51:39 +02:00
parent 22a16e36f6
commit f6eebcb336
19 changed files with 244 additions and 135 deletions

View file

@ -23,7 +23,7 @@ async function processCreateActivity (activity: ActivityCreate) {
} else if (activityType === 'Dislike') {
return retryTransactionWrapper(processCreateDislike, actor, activity)
} else if (activityType === 'Video') {
return processCreateVideo(actor, activity)
return processCreateVideo(activity)
} else if (activityType === 'Flag') {
return retryTransactionWrapper(processCreateVideoAbuse, actor, activityObject as VideoAbuseObject)
} else if (activityType === 'Note') {
@ -42,13 +42,10 @@ export {
// ---------------------------------------------------------------------------
async function processCreateVideo (
actor: ActorModel,
activity: ActivityCreate
) {
async function processCreateVideo (activity: ActivityCreate) {
const videoToCreateData = activity.object as VideoTorrentObject
const { video } = await getOrCreateAccountAndVideoAndChannel(videoToCreateData, actor)
const { video } = await getOrCreateAccountAndVideoAndChannel(videoToCreateData)
return video
}