forked from AkkomaGang/akkoma
Fetch relayed messages from source while we don't have linked data sigs.
This commit is contained in:
parent
83d4a1495c
commit
c50c7745bc
1 changed files with 2 additions and 1 deletions
|
@ -36,7 +36,8 @@ def inbox(%{assigns: %{valid_signature: true}} = conn, params) do
|
||||||
def inbox(conn, params) do
|
def inbox(conn, params) do
|
||||||
headers = Enum.into(conn.req_headers, %{})
|
headers = Enum.into(conn.req_headers, %{})
|
||||||
if !(String.contains?(headers["signature"] || "", params["actor"])) do
|
if !(String.contains?(headers["signature"] || "", params["actor"])) do
|
||||||
Logger.info("Signature not from author, relayed message, ignoring")
|
Logger.info("Signature not from author, relayed message, fetching from source")
|
||||||
|
ActivityPub.fetch_object_from_id(params["object"]["id"])
|
||||||
else
|
else
|
||||||
Logger.info("Signature error")
|
Logger.info("Signature error")
|
||||||
Logger.info("Could not validate #{params["actor"]}")
|
Logger.info("Could not validate #{params["actor"]}")
|
||||||
|
|
Loading…
Reference in a new issue