aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api/utils.ex
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-04-23 12:40:38 +0000
committerrinpatch <rinpatch@sdf.org>2020-04-23 12:40:38 +0000
commit1b5f8d19eeccfe202c0377079caa6a1d6f3cacb5 (patch)
tree92e61042aeda2157a8ce09a98f47e1736b9296f3 /lib/pleroma/web/common_api/utils.ex
parent25eec6d72dae6e771b777aa6460acd600a17fe7d (diff)
parent7d38197894692306c940b55045b91d563e138284 (diff)
downloadpleroma-1b5f8d19eeccfe202c0377079caa6a1d6f3cacb5.tar.gz
Merge branch 'bugfix/repeating-announce' into 'develop'
CommonAPI: Don't make repeating announces possible See merge request pleroma/pleroma!2418
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 7eec5aa09..945e63e22 100644
--- a/lib/pleroma/web/common_api/utils.ex
+++ b/lib/pleroma/web/common_api/utils.ex
@@ -22,24 +22,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