projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'features/glitch-soc-frontend' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
rich_media
/
parsers
/
oembed_parser.ex
diff --git
a/lib/pleroma/web/rich_media/parsers/oembed_parser.ex
b/lib/pleroma/web/rich_media/parsers/oembed_parser.ex
index ca7226fafd88f7b21dec7d2da49d479c6d6bc4b8..2530b8c9d0b29bff8d454c79eeb066b0150d8c2e 100644
(file)
--- a/
lib/pleroma/web/rich_media/parsers/oembed_parser.ex
+++ b/
lib/pleroma/web/rich_media/parsers/oembed_parser.ex
@@
-20,8
+20,12
@@
defmodule Pleroma.Web.RichMedia.Parsers.OEmbed do
end
defp get_oembed_data(url) do
end
defp get_oembed_data(url) do
- {:ok, %Tesla.Env{body: json}} = Pleroma.HTTP.get(url)
+ {:ok, %Tesla.Env{body: json}} = Pleroma.HTTP.get(url
, [], adapter: [pool: :media]
)
- {:ok, Poison.decode!(json)}
+ {:ok, data} = Jason.decode(json)
+
+ data = data |> Map.new(fn {k, v} -> {String.to_atom(k), v} end)
+
+ {:ok, data}
end
end
end
end