diff --git a/backend/lib/backend/crawler/api_crawler.ex b/backend/lib/backend/crawler/api_crawler.ex index 5564881..15fbf93 100644 --- a/backend/lib/backend/crawler/api_crawler.ex +++ b/backend/lib/backend/crawler/api_crawler.ex @@ -18,7 +18,7 @@ defmodule Backend.Crawler.ApiCrawler do # {domain, type} e.g. {"gab.com", "reject"} @type federation_restriction :: {String.t(), String.t()} - @type instance_type :: :mastodon | :pleroma | :gab | :misskey | :gnusocial + @type instance_type :: :mastodon | :pleroma | :gab | :misskey | :gnusocial | :smithereen defstruct [ :version, diff --git a/backend/lib/backend/crawler/crawlers/mastodon.ex b/backend/lib/backend/crawler/crawlers/mastodon.ex index 68442b0..85c6f04 100644 --- a/backend/lib/backend/crawler/crawlers/mastodon.ex +++ b/backend/lib/backend/crawler/crawlers/mastodon.ex @@ -12,7 +12,7 @@ defmodule Backend.Crawler.Crawlers.Mastodon do @impl ApiCrawler def is_instance_type?(domain, result) do # We might already know that this is a Pleroma instance from nodeinfo - if result != nil and Map.get(result, :instance_type) == :pleroma do + if result != nil and ( Map.get(result, :instance_type) == :pleroma or Map.get(result, :instance_type) == :smithereen ) do true else case get_and_decode("https://#{domain}/api/v1/instance") do @@ -230,6 +230,7 @@ defmodule Backend.Crawler.Crawlers.Mastodon do defp get_instance_type(instance_stats) do cond do Map.get(instance_stats, "version") |> String.downcase() =~ "pleroma" -> :pleroma + Map.get(instance_stats, "version") |> String.downcase() =~ "smithereen" -> :smithereen is_gab?(instance_stats) -> :gab true -> :mastodon end diff --git a/frontend/src/constants.tsx b/frontend/src/constants.tsx index 3fdaadc..147d329 100644 --- a/frontend/src/constants.tsx +++ b/frontend/src/constants.tsx @@ -20,6 +20,7 @@ export const QUALITATIVE_COLOR_SCHEME = [ "#AD99FF", "#0E5A8A", "#0A6640", + "#AAB42F", "#A66321", "#A82A2A", ]; @@ -56,4 +57,5 @@ export const INSTANCE_TYPES = [ "hubzilla", "plume", "wordpress", + "smithereen", ];