From 29b022bb597f36621ef3f5056c5ca2b7f0c8edbe Mon Sep 17 00:00:00 2001 From: rinpatch Date: Tue, 4 Jun 2019 12:42:10 +0300 Subject: [PATCH] Restrict `get_existing_votes` to only get Create activities --- lib/pleroma/web/activity_pub/utils.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pleroma/web/activity_pub/utils.ex b/lib/pleroma/web/activity_pub/utils.ex index b8159e9e5..faae7e747 100644 --- a/lib/pleroma/web/activity_pub/utils.ex +++ b/lib/pleroma/web/activity_pub/utils.ex @@ -794,6 +794,7 @@ defmodule Pleroma.Web.ActivityPub.Utils do query = from( [activity, object: object] in Activity.with_preloaded_object(Activity), + where: fragment("(?)->>'type' = 'Create'", activity.data), where: fragment("(?)->>'actor' = ?", activity.data, ^actor), where: fragment(