mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Prepare Dislike/Flag/View fixes
For now we Create these activities, but we should just send them directly. This fix handles correctly direct Dislikes/Flags/Views, we'll implement the sending correctly these activities in the next peertube version
This commit is contained in:
parent
44b9c0ba31
commit
848f499def
30 changed files with 330 additions and 755 deletions
|
@ -6,6 +6,7 @@ import { ActorModel } from '../../../models/activitypub/actor'
|
|||
import { forwardVideoRelatedActivity } from '../send/utils'
|
||||
import { getOrCreateVideoAndAccountAndChannel } from '../videos'
|
||||
import { getVideoLikeActivityPubUrl } from '../url'
|
||||
import { getAPId } from '../../../helpers/activitypub'
|
||||
|
||||
async function processLikeActivity (activity: ActivityLike, byActor: ActorModel) {
|
||||
return retryTransactionWrapper(processLikeVideo, byActor, activity)
|
||||
|
@ -20,7 +21,7 @@ export {
|
|||
// ---------------------------------------------------------------------------
|
||||
|
||||
async function processLikeVideo (byActor: ActorModel, activity: ActivityLike) {
|
||||
const videoUrl = activity.object
|
||||
const videoUrl = getAPId(activity.object)
|
||||
|
||||
const byAccount = byActor.Account
|
||||
if (!byAccount) throw new Error('Cannot create like with the non account actor ' + byActor.url)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue