projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
using atom keys in search params
[akkoma]
/
lib
/
pleroma
/
object
/
fetcher.ex
diff --git
a/lib/pleroma/object/fetcher.ex
b/lib/pleroma/object/fetcher.ex
index 23ecd9e15ef61a23fe187c7dd67ca65db7e6a7d2..3e2949ee2354f3009ae68142a1a01a5a10b86c6b 100644
(file)
--- a/
lib/pleroma/object/fetcher.ex
+++ b/
lib/pleroma/object/fetcher.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Object.Fetcher do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Object.Fetcher do
@@
-83,8
+83,8
@@
defmodule Pleroma.Object.Fetcher do
{:transmogrifier, {:error, {:reject, nil}}} ->
{:reject, nil}
{:transmogrifier, {:error, {:reject, nil}}} ->
{:reject, nil}
- {:transmogrifier, _} ->
- {:error,
"Transmogrifier failure."
}
+ {:transmogrifier, _}
= e
->
+ {:error,
e
}
{:object, data, nil} ->
reinject_object(%Object{}, data)
{:object, data, nil} ->
reinject_object(%Object{}, data)
@@
-141,7
+141,7
@@
defmodule Pleroma.Object.Fetcher do
date: date
})
date: date
})
- [{
:Signature
, signature}]
+ [{
"signature"
, signature}]
end
defp sign_fetch(headers, id, date) do
end
defp sign_fetch(headers, id, date) do
@@
-154,7
+154,7
@@
defmodule Pleroma.Object.Fetcher do
defp maybe_date_fetch(headers, date) do
if Pleroma.Config.get([:activitypub, :sign_object_fetches]) do
defp maybe_date_fetch(headers, date) do
if Pleroma.Config.get([:activitypub, :sign_object_fetches]) do
- headers ++ [{
:Date
, date}]
+ headers ++ [{
"date"
, date}]
else
headers
end
else
headers
end
@@
-166,7
+166,7
@@
defmodule Pleroma.Object.Fetcher do
date = Pleroma.Signature.signed_date()
headers =
date = Pleroma.Signature.signed_date()
headers =
- [{
:Accept
, "application/activity+json"}]
+ [{
"accept"
, "application/activity+json"}]
|> maybe_date_fetch(date)
|> sign_fetch(id, date)
|> maybe_date_fetch(date)
|> sign_fetch(id, date)