From: eal Date: Mon, 13 Aug 2018 13:21:18 +0000 (+0300) Subject: Use Image type for emoji icons. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=92caa2632ba559961ebceccc9c0b44fbb8af05ed;p=akkoma Use Image type for emoji icons. --- diff --git a/lib/pleroma/web/common_api/utils.ex b/lib/pleroma/web/common_api/utils.ex index f6960bf41..7bab0e4ff 100644 --- a/lib/pleroma/web/common_api/utils.ex +++ b/lib/pleroma/web/common_api/utils.ex @@ -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) diff --git a/test/web/common_api/common_api_utils_test.exs b/test/web/common_api/common_api_utils_test.exs index cf97b2bfd..f7d614582 100644 --- a/test/web/common_api/common_api_utils_test.exs +++ b/test/web/common_api/common_api_utils_test.exs @@ -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:" } ]