From dd775b6ae25f381cf76e00999fd7d37764870122 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 19 Dec 2023 09:52:32 +0100 Subject: [PATCH] fix(nodeinfo): fix getting application actor information from NodeInfo response Signed-off-by: Thomas Citharel --- lib/federation/node_info.ex | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/federation/node_info.ex b/lib/federation/node_info.ex index 688abdac8..66e1bc43a 100644 --- a/lib/federation/node_info.ex +++ b/lib/federation/node_info.ex @@ -25,9 +25,10 @@ defmodule Mobilizon.Federation.NodeInfo do defp extract_application_actor(body) do body - |> Enum.find(%{rel: @application_uri, href: nil}, fn %{rel: rel, href: href} -> + |> Map.get("links", []) + |> Enum.find(%{"rel" => @application_uri, "href" => nil}, fn %{"rel" => rel, "href" => href} -> rel == @application_uri and is_binary(href) end) - |> Map.get(:href) + |> Map.get("href") end end