aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-05-02 16:22:21 +0000
committerrinpatch <rinpatch@sdf.org>2020-05-02 16:22:21 +0000
commit019a192e43c2421c74e5126e753aac095db8ad54 (patch)
tree3415b92ed0cb9e59f39946a1439fd918c6ea07ee /lib/pleroma/web/common_api/utils.ex
parent3b15a0eecc62f79465620a697f12b576ed87b0fc (diff)
parent04f23294d327f044a72ecd3f269846c2f6198cf1 (diff)
downloadpleroma-2.0.3.tar.gz
Merge branch 'release/2.0.3' into 'stable'v2.0.3
Release/2.0.3 See merge request pleroma/secteam/pleroma!3
Diffstat (limited to 'lib/pleroma/web/common_api/utils.ex')
-rw-r--r--lib/pleroma/web/common_api/utils.ex18
1 files changed, 0 insertions, 18 deletions
diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex
index 635e7cd38..26dcd463c 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -24,24 +24,6 @@ defmodule Pleroma.Web.CommonAPI.Utils do
require Logger
require Pleroma.Constants
- # This is a hack for twidere.
- def get_by_id_or_ap_id(id) do
- activity =
- with true <- FlakeId.flake_id?(id),
- %Activity{} = activity <- Activity.get_by_id_with_object(id) do
- activity
- else
- _ -> Activity.get_create_by_object_ap_id_with_object(id)
- end
-
- activity &&
- if activity.data["type"] == "Create" do
- activity
- else
- Activity.get_create_by_object_ap_id_with_object(activity.data["object"])
- end
- end
-
def attachments_from_ids(%{"media_ids" => ids, "descriptions" => desc} = _) do
attachments_from_ids_descs(ids, desc)
end