From c15aff666d20bb020fff46474d23b0559a8ab262 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 12 Feb 2021 14:49:59 +0100 Subject: Remove old code We consider Dislike as a classic activity now --- server/lib/activitypub/process/process-undo.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'server/lib') 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' import { AccountVideoRateModel } from '../../../models/account/account-video-rate' import { ActorModel } from '../../../models/activitypub/actor' import { ActorFollowModel } from '../../../models/activitypub/actor-follow' -import { forwardVideoRelatedActivity } from '../send/utils' -import { getOrCreateVideoAndAccountAndChannel } from '../videos' -import { VideoShareModel } from '../../../models/video/video-share' import { VideoRedundancyModel } from '../../../models/redundancy/video-redundancy' +import { VideoShareModel } from '../../../models/video/video-share' import { APProcessorOptions } from '../../../types/activitypub-processor.model' import { MActorSignature } from '../../../types/models' +import { forwardVideoRelatedActivity } from '../send/utils' +import { getOrCreateVideoAndAccountAndChannel } from '../videos' async function processUndoActivity (options: APProcessorOptions) { const { activity, byActor } = options @@ -22,9 +22,7 @@ async function processUndoActivity (options: APProcessorOptions) { } if (activityToUndo.type === 'Create') { - if (activityToUndo.object.type === 'Dislike') { - return retryTransactionWrapper(processUndoDislike, byActor, activity) - } else if (activityToUndo.object.type === 'CacheFile') { + if (activityToUndo.object.type === 'CacheFile') { return retryTransactionWrapper(processUndoCacheFile, byActor, activity) } } -- cgit v1.2.3