Use Image type for emoji icons.
authoreal <eal@waifu.club>
Mon, 13 Aug 2018 13:21:18 +0000 (16:21 +0300)
committereal <eal@waifu.club>
Mon, 13 Aug 2018 13:21:18 +0000 (16:21 +0300)
lib/pleroma/web/common_api/utils.ex
test/web/common_api/common_api_utils_test.exs

index f6960bf4146fa5267b90fcb7be9a682bc3b162dc..7bab0e4ff4ab042cb6403fbcbb7163a961f97265 100644 (file)
@@ -203,7 +203,7 @@ defmodule Pleroma.Web.CommonAPI.Utils do
     |> Enum.map(fn {shortcode, url} ->
       %{
         "type" => "Emoji",
-        "icon" => %{"url" => "#{Endpoint.url()}#{url}"},
+        "icon" => %{"type" => "Image", "url" => "#{Endpoint.url()}#{url}"},
         "name" => ":#{shortcode}:"
       }
     end)
index cf97b2bfd2a33ae7a713365c791b539bc30d876f..f7d6145824b18feede4754e2b321e1c2d4865a73 100644 (file)
@@ -37,12 +37,12 @@ defmodule Pleroma.Web.CommonAPI.UtilsTest do
     expected = [
       %{
         "type" => "Emoji",
-        "icon" => %{"url" => "#{Endpoint.url()}/finmoji/128px/perkele-128.png"},
+        "icon" => %{"type" => "Image", "url" => "#{Endpoint.url()}/finmoji/128px/perkele-128.png"},
         "name" => ":perkele:"
       },
       %{
         "type" => "Emoji",
-        "icon" => %{"url" => "#{Endpoint.url()}/finmoji/128px/karjalanpiirakka-128.png"},
+        "icon" => %{"type" => "Image", "url" => "#{Endpoint.url()}/finmoji/128px/karjalanpiirakka-128.png"},
         "name" => ":karjalanpiirakka:"
       }
     ]