1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 10:49:28 +02:00

Don't refresh videos when processing views

It allows us to use a cache
This commit is contained in:
Chocobozzz 2020-02-04 15:45:41 +01:00
parent 7eba5e1fa8
commit 943e519390
No known key found for this signature in database
GPG key ID: 583A612D890159BE
9 changed files with 95 additions and 34 deletions

View file

@ -7,7 +7,7 @@ import { JobQueue } from '../../job-queue'
import { getActorsInvolvedInVideo, getAudienceFromFollowersOf, getRemoteVideoAudience } from '../audience'
import { getServerActor } from '../../../helpers/utils'
import { afterCommitIfTransaction } from '../../../helpers/database-utils'
import { MActorWithInboxes, MActor, MActorId, MActorLight, MVideo, MVideoAccountLight } from '../../../typings/models'
import { MActorWithInboxes, MActor, MActorId, MActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../../typings/models'
import { ContextType } from '@server/helpers/activitypub'
async function sendVideoRelatedActivity (activityBuilder: (audience: ActivityAudience) => Activity, options: {
@ -43,7 +43,7 @@ async function forwardVideoRelatedActivity (
activity: Activity,
t: Transaction,
followersException: MActorWithInboxes[] = [],
video: MVideo
video: MVideoId
) {
// Mastodon does not add our announces in audience, so we forward to them manually
const additionalActors = await getActorsInvolvedInVideo(video, t)