From: rinpatch Date: Tue, 4 Jun 2019 09:42:10 +0000 (+0300) Subject: Restrict `get_existing_votes` to only get Create activities X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=29b022bb597f36621ef3f5056c5ca2b7f0c8edbe;p=akkoma Restrict `get_existing_votes` to only get Create activities --- 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(