Introduce group posts

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-07-09 17:24:28 +02:00
parent bec1c69d4b
commit 9c9f1385fb
249 changed files with 11886 additions and 5023 deletions

View File

@@ -118,13 +118,15 @@ defmodule Mobilizon.Federation.WebFinger do
Logger.debug(inspect(address))
with false <- is_nil(domain),
{:ok, %HTTPoison.Response{} = response} <-
HTTPoison.get(
{:ok, %{} = response} <-
Tesla.get(
address,
[Accept: "application/json, application/activity+json, application/jrd+json"],
@http_options
headers: [
{"accept", "application/json, application/activity+json, application/jrd+json"}
],
opts: @http_options
),
%{status_code: status_code, body: body} when status_code in 200..299 <- response,
%{status: status, body: body} when status in 200..299 <- response,
{:ok, doc} <- Jason.decode(body) do
webfinger_from_json(doc)
else