X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fostatus%2Fostatus.ex;h=a3155b79dd07db2ca586f7800e1f7aa75f8a57f7;hb=57549f60434250d538d61b926906c0b7d284c627;hp=8ec92d5f1699c97105fa0b698c3289c44ec312bf;hpb=21afdf6d9966265de95df860d90d250c76bdbe08;p=akkoma
diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex
index 8ec92d5f1..a3155b79d 100644
--- a/lib/pleroma/web/ostatus/ostatus.ex
+++ b/lib/pleroma/web/ostatus/ostatus.ex
@@ -1,3 +1,7 @@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Web.OStatus do
@httpoison Application.get_env(:pleroma, :httpoison)
@@ -26,16 +30,6 @@ defmodule Pleroma.Web.OStatus do
end
end
- def metadata(url), do: oembed_links(url)
-
- def oembed_links(url) do
- Enum.map(["xml", "json"], fn format ->
- href = oembed_path(url, format)
- " Enum.join("\r\n")
- end
-
def feed_path(user) do
"#{user.ap_id}/feed.atom"
end
@@ -52,11 +46,6 @@ defmodule Pleroma.Web.OStatus do
"#{Web.base_url()}/ostatus_subscribe?acct={uri}"
end
- def oembed_path(url, format) do
- query = URI.encode_query(%{url: url, format: format})
- "#{Web.base_url()}/oembed?#{query}"
- end
-
def handle_incoming(xml_string) do
with doc when doc != :error <- parse_document(xml_string) do
entries = :xmerl_xpath.string('//entry', doc)
@@ -159,7 +148,7 @@ defmodule Pleroma.Web.OStatus do
Logger.debug("Trying to get entry from db")
with id when not is_nil(id) <- string_from_xpath("//activity:object[1]/id", entry),
- %Activity{} = activity <- Activity.get_create_activity_by_object_ap_id(id) do
+ %Activity{} = activity <- Activity.get_create_by_object_ap_id(id) do
{:ok, activity}
else
_ ->