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:
parent
1de1d05f4c
commit
cef534ed53
52 changed files with 2479 additions and 141 deletions
|
@ -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 }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue