1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Add user notification base code

This commit is contained in:
Chocobozzz 2018-12-26 10:36:24 +01:00 committed by Chocobozzz
parent 1de1d05f4c
commit cef534ed53
52 changed files with 2479 additions and 141 deletions

View file

@ -70,7 +70,7 @@ async function addVideoComment (videoInstance: VideoModel, commentUrl: string) {
throw new Error(`Comment url ${commentUrl} host is different from the AP object id ${body.id}`)
}
const actor = await getOrCreateActorAndServerAndModel(actorUrl)
const actor = await getOrCreateActorAndServerAndModel(actorUrl, 'all')
const entry = await videoCommentActivityObjectToDBAttributes(videoInstance, actor, body)
if (!entry) return { created: false }
@ -80,6 +80,8 @@ async function addVideoComment (videoInstance: VideoModel, commentUrl: string) {
},
defaults: entry
})
comment.Account = actor.Account
comment.Video = videoInstance
return { comment, created }
}