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 --- README.md | 6 +++--- server/lib/activitypub/process/process-undo.ts | 10 ++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 035468880..377794a0a 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Be part of a network of multiple small federated, interoperable video hosting pr test suite status - + JavaScript Style Guide

@@ -58,7 +58,7 @@ Be part of a network of multiple small federated, interoperable video hosting pr

- screenshot + screenshot

@@ -190,4 +190,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License -along with this program. If not, see . +along with this program. If not, see . 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