aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/object.ex
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-01-31 00:09:13 +0300
committerrinpatch <rinpatch@sdf.org>2020-01-31 00:09:13 +0300
commit62b5da21e7eb7cfc82b635dfcac39258aacedb9c (patch)
treeea32e34eead4651b9baff2d2f46e71d143a93b9a /lib/pleroma/object.ex
parent946de2299cccebac6718e3a132397ff5c06c67ee (diff)
downloadpleroma-revert/attachment-cleanup.tar.gz
Revert "Merge branch 'feature/attachments-cleanup' into 'develop'"revert/attachment-cleanup
This reverts commit a431e8c9f7033c739e10b0e8b34c75f2cc1d38d4, reversing changes made to 8b4d81609d5627d62b826bcd3e87290cb513495f.
Diffstat (limited to 'lib/pleroma/object.ex')
-rw-r--r--lib/pleroma/object.ex14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/pleroma/object.ex b/lib/pleroma/object.ex
index 38e372f6d..9a91fba9a 100644
--- a/lib/pleroma/object.ex
+++ b/lib/pleroma/object.ex
@@ -83,20 +83,6 @@ defmodule Pleroma.Object do
Repo.one(from(object in Object, where: fragment("(?)->>'id' = ?", object.data, ^ap_id)))
end
- @doc """
- Get a single attachment by it's name and href
- """
- @spec get_attachment_by_name_and_href(String.t(), String.t()) :: Object.t() | nil
- def get_attachment_by_name_and_href(name, href) do
- query =
- from(o in Object,
- where: fragment("(?)->>'name' = ?", o.data, ^name),
- where: fragment("(?)->>'href' = ?", o.data, ^href)
- )
-
- Repo.one(query)
- end
-
defp warn_on_no_object_preloaded(ap_id) do
"Object.normalize() called without preloaded object (#{inspect(ap_id)}). Consider preloading the object"
|> Logger.debug()