diff options
author | Chocobozzz <me@florianbigard.com> | 2020-02-04 15:45:41 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-02-04 15:58:59 +0100 |
commit | 943e5193905908dd1f2800d8810c635d86e3b28f (patch) | |
tree | 961973733e6e4afb58ac222d2847a3fc4b6d6d60 /server/lib/activitypub/send/utils.ts | |
parent | 7eba5e1fa81c8e54cb8fe298a96e8070afa50921 (diff) | |
download | PeerTube-943e5193905908dd1f2800d8810c635d86e3b28f.tar.gz PeerTube-943e5193905908dd1f2800d8810c635d86e3b28f.tar.zst PeerTube-943e5193905908dd1f2800d8810c635d86e3b28f.zip |
Don't refresh videos when processing views
It allows us to use a cache
Diffstat (limited to 'server/lib/activitypub/send/utils.ts')
-rw-r--r-- | server/lib/activitypub/send/utils.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/activitypub/send/utils.ts b/server/lib/activitypub/send/utils.ts index 0d67bb3d6..9436daf17 100644 --- a/server/lib/activitypub/send/utils.ts +++ b/server/lib/activitypub/send/utils.ts | |||
@@ -7,7 +7,7 @@ import { JobQueue } from '../../job-queue' | |||
7 | import { getActorsInvolvedInVideo, getAudienceFromFollowersOf, getRemoteVideoAudience } from '../audience' | 7 | import { getActorsInvolvedInVideo, getAudienceFromFollowersOf, getRemoteVideoAudience } from '../audience' |
8 | import { getServerActor } from '../../../helpers/utils' | 8 | import { getServerActor } from '../../../helpers/utils' |
9 | import { afterCommitIfTransaction } from '../../../helpers/database-utils' | 9 | import { afterCommitIfTransaction } from '../../../helpers/database-utils' |
10 | import { MActorWithInboxes, MActor, MActorId, MActorLight, MVideo, MVideoAccountLight } from '../../../typings/models' | 10 | import { MActorWithInboxes, MActor, MActorId, MActorLight, MVideo, MVideoAccountLight, MVideoId } from '../../../typings/models' |
11 | import { ContextType } from '@server/helpers/activitypub' | 11 | import { ContextType } from '@server/helpers/activitypub' |
12 | 12 | ||
13 | async function sendVideoRelatedActivity (activityBuilder: (audience: ActivityAudience) => Activity, options: { | 13 | async function sendVideoRelatedActivity (activityBuilder: (audience: ActivityAudience) => Activity, options: { |
@@ -43,7 +43,7 @@ async function forwardVideoRelatedActivity ( | |||
43 | activity: Activity, | 43 | activity: Activity, |
44 | t: Transaction, | 44 | t: Transaction, |
45 | followersException: MActorWithInboxes[] = [], | 45 | followersException: MActorWithInboxes[] = [], |
46 | video: MVideo | 46 | video: MVideoId |
47 | ) { | 47 | ) { |
48 | // Mastodon does not add our announces in audience, so we forward to them manually | 48 | // Mastodon does not add our announces in audience, so we forward to them manually |
49 | const additionalActors = await getActorsInvolvedInVideo(video, t) | 49 | const additionalActors = await getActorsInvolvedInVideo(video, t) |