diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-12 14:49:59 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-12 14:53:07 +0100 |
commit | c15aff666d20bb020fff46474d23b0559a8ab262 (patch) | |
tree | 6435fbbdeca38aa6a76587b61be549c9652e980d /server | |
parent | 18ffaf2430df57ecc2150bdd89a7ecfd08bd1257 (diff) | |
download | PeerTube-c15aff666d20bb020fff46474d23b0559a8ab262.tar.gz PeerTube-c15aff666d20bb020fff46474d23b0559a8ab262.tar.zst PeerTube-c15aff666d20bb020fff46474d23b0559a8ab262.zip |
Remove old code
We consider Dislike as a classic activity now
Diffstat (limited to 'server')
-rw-r--r-- | server/lib/activitypub/process/process-undo.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/server/lib/activitypub/process/process-undo.ts b/server/lib/activitypub/process/process-undo.ts index caf672cd6..e520c2f0d 100644 --- a/server/lib/activitypub/process/process-undo.ts +++ b/server/lib/activitypub/process/process-undo.ts | |||
@@ -6,12 +6,12 @@ import { sequelizeTypescript } from '../../../initializers/database' | |||
6 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' | 6 | import { AccountVideoRateModel } from '../../../models/account/account-video-rate' |
7 | import { ActorModel } from '../../../models/activitypub/actor' | 7 | import { ActorModel } from '../../../models/activitypub/actor' |
8 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' | 8 | import { ActorFollowModel } from '../../../models/activitypub/actor-follow' |
9 | import { forwardVideoRelatedActivity } from '../send/utils' | ||
10 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | ||
11 | import { VideoShareModel } from '../../../models/video/video-share' | ||
12 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' | 9 | import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' |
10 | import { VideoShareModel } from '../../../models/video/video-share' | ||
13 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' | 11 | import { APProcessorOptions } from '../../../types/activitypub-processor.model' |
14 | import { MActorSignature } from '../../../types/models' | 12 | import { MActorSignature } from '../../../types/models' |
13 | import { forwardVideoRelatedActivity } from '../send/utils' | ||
14 | import { getOrCreateVideoAndAccountAndChannel } from '../videos' | ||
15 | 15 | ||
16 | async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) { | 16 | async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) { |
17 | const { activity, byActor } = options | 17 | const { activity, byActor } = options |
@@ -22,9 +22,7 @@ async function processUndoActivity (options: APProcessorOptions<ActivityUndo>) { | |||
22 | } | 22 | } |
23 | 23 | ||
24 | if (activityToUndo.type === 'Create') { | 24 | if (activityToUndo.type === 'Create') { |
25 | if (activityToUndo.object.type === 'Dislike') { | 25 | if (activityToUndo.object.type === 'CacheFile') { |
26 | return retryTransactionWrapper(processUndoDislike, byActor, activity) | ||
27 | } else if (activityToUndo.object.type === 'CacheFile') { | ||
28 | return retryTransactionWrapper(processUndoCacheFile, byActor, activity) | 26 | return retryTransactionWrapper(processUndoCacheFile, byActor, activity) |
29 | } | 27 | } |
30 | } | 28 | } |