From 5c79ff8503334e7fa671d29390859fd7398536e6 Mon Sep 17 00:00:00 2001 From: Oneric Date: Sat, 19 Apr 2025 19:39:56 +0200 Subject: [PATCH] queries: drop unused query function --- lib/pleroma/activity/queries.ex | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/pleroma/activity/queries.ex b/lib/pleroma/activity/queries.ex index 4632651b0..456d4afe0 100644 --- a/lib/pleroma/activity/queries.ex +++ b/lib/pleroma/activity/queries.ex @@ -7,7 +7,7 @@ defmodule Pleroma.Activity.Queries do Contains queries for Activity. """ - import Ecto.Query, only: [from: 2, where: 3] + import Ecto.Query, only: [from: 2] @type query :: Ecto.Queryable.t() | Activity.t() @@ -72,22 +72,6 @@ def by_object_id(query, object_id) when is_binary(object_id) do ) end - @spec by_object_in_reply_to_id(query, String.t(), keyword()) :: query - def by_object_in_reply_to_id(query, in_reply_to_id, opts \\ []) do - query = - if opts[:skip_preloading] do - Activity.with_joined_object(query) - else - Activity.with_preloaded_object(query) - end - - where( - query, - [activity, object: o], - fragment("(?)->>'inReplyTo' = ?", o.data, ^to_string(in_reply_to_id)) - ) - end - @spec by_type(query, String.t()) :: query def by_type(query \\ Activity, activity_type) do from(