diff options
author | Chocobozzz <me@florianbigard.com> | 2022-03-18 11:17:35 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-03-18 11:21:50 +0100 |
commit | 57e4e1c1a95c3a81a967f54ecc2a510d8b0e129c (patch) | |
tree | fcf12670d643ec4a3b5eccdfa834227c0417d988 /server/lib/activitypub/send/send-like.ts | |
parent | 2e3f7a5a6fbae276d3ba1cb1b08289917ec7604b (diff) | |
download | PeerTube-57e4e1c1a95c3a81a967f54ecc2a510d8b0e129c.tar.gz PeerTube-57e4e1c1a95c3a81a967f54ecc2a510d8b0e129c.tar.zst PeerTube-57e4e1c1a95c3a81a967f54ecc2a510d8b0e129c.zip |
Don't store remote rates of remote videos
In the future we'll stop to expose all available rates to improve users
privacy
Diffstat (limited to 'server/lib/activitypub/send/send-like.ts')
-rw-r--r-- | server/lib/activitypub/send/send-like.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/lib/activitypub/send/send-like.ts b/server/lib/activitypub/send/send-like.ts index ed6dfcf56..a5fe95e0a 100644 --- a/server/lib/activitypub/send/send-like.ts +++ b/server/lib/activitypub/send/send-like.ts | |||
@@ -1,10 +1,10 @@ | |||
1 | import { Transaction } from 'sequelize' | 1 | import { Transaction } from 'sequelize' |
2 | import { ActivityAudience, ActivityLike } from '../../../../shared/models/activitypub' | 2 | import { ActivityAudience, ActivityLike } from '@shared/models' |
3 | import { getVideoLikeActivityPubUrlByLocalActor } from '../url' | ||
4 | import { sendVideoRelatedActivity } from './utils' | ||
5 | import { audiencify, getAudience } from '../audience' | ||
6 | import { logger } from '../../../helpers/logger' | 3 | import { logger } from '../../../helpers/logger' |
7 | import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models' | 4 | import { MActor, MActorAudience, MVideoAccountLight, MVideoUrl } from '../../../types/models' |
5 | import { audiencify, getAudience } from '../audience' | ||
6 | import { getVideoLikeActivityPubUrlByLocalActor } from '../url' | ||
7 | import { sendVideoActivityToOrigin } from './shared/send-utils' | ||
8 | 8 | ||
9 | function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { | 9 | function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { |
10 | logger.info('Creating job to like %s.', video.url) | 10 | logger.info('Creating job to like %s.', video.url) |
@@ -15,7 +15,7 @@ function sendLike (byActor: MActor, video: MVideoAccountLight, t: Transaction) { | |||
15 | return buildLikeActivity(url, byActor, video, audience) | 15 | return buildLikeActivity(url, byActor, video, audience) |
16 | } | 16 | } |
17 | 17 | ||
18 | return sendVideoRelatedActivity(activityBuilder, { byActor, video, transaction: t }) | 18 | return sendVideoActivityToOrigin(activityBuilder, { byActor, video, transaction: t }) |
19 | } | 19 | } |
20 | 20 | ||
21 | function buildLikeActivity (url: string, byActor: MActorAudience, video: MVideoUrl, audience?: ActivityAudience): ActivityLike { | 21 | function buildLikeActivity (url: string, byActor: MActorAudience, video: MVideoUrl, audience?: ActivityAudience): ActivityLike { |