Change path from nodeinfo to metadata->features
This commit is contained in:
parent
86795d5ac2
commit
a1325d5fd9
|
@ -152,7 +152,7 @@ def download_from(conn, %{"instance_address" => address, "pack_name" => name} =
|
||||||
|> Tesla.get!()
|
|> Tesla.get!()
|
||||||
|> Map.get(:body)
|
|> Map.get(:body)
|
||||||
|> Jason.decode!()
|
|> Jason.decode!()
|
||||||
|> Map.get("features")
|
|> get_in(["metadata", "features"])
|
||||||
|> Enum.member?("shareable_emoji_packs")
|
|> Enum.member?("shareable_emoji_packs")
|
||||||
|
|
||||||
if shareable_packs_available do
|
if shareable_packs_available do
|
||||||
|
|
|
@ -55,10 +55,10 @@ test "downloading shared & unshared packs from another instance via download_fro
|
||||||
|
|
||||||
mock(fn
|
mock(fn
|
||||||
%{method: :get, url: "https://old-instance/nodeinfo/2.1.json"} ->
|
%{method: :get, url: "https://old-instance/nodeinfo/2.1.json"} ->
|
||||||
json(%{features: []})
|
json(%{metadata: %{features: []}})
|
||||||
|
|
||||||
%{method: :get, url: "https://example.com/nodeinfo/2.1.json"} ->
|
%{method: :get, url: "https://example.com/nodeinfo/2.1.json"} ->
|
||||||
json(%{features: ["shareable_emoji_packs"]})
|
json(%{metadata: %{features: ["shareable_emoji_packs"]}})
|
||||||
|
|
||||||
%{
|
%{
|
||||||
method: :get,
|
method: :get,
|
||||||
|
|
Loading…
Reference in New Issue