Restrict `get_existing_votes` to only get Create activities
This commit is contained in:
parent
d977d73b91
commit
29b022bb59
|
@ -794,6 +794,7 @@ def get_existing_votes(actor, %{data: %{"id" => id}}) do
|
||||||
query =
|
query =
|
||||||
from(
|
from(
|
||||||
[activity, object: object] in Activity.with_preloaded_object(Activity),
|
[activity, object: object] in Activity.with_preloaded_object(Activity),
|
||||||
|
where: fragment("(?)->>'type' = 'Create'", activity.data),
|
||||||
where: fragment("(?)->>'actor' = ?", activity.data, ^actor),
|
where: fragment("(?)->>'actor' = ?", activity.data, ^actor),
|
||||||
where:
|
where:
|
||||||
fragment(
|
fragment(
|
||||||
|
|
Loading…
Reference in New Issue