From 92caa2632ba559961ebceccc9c0b44fbb8af05ed Mon Sep 17 00:00:00 2001 From: eal Date: Mon, 13 Aug 2018 16:21:18 +0300 Subject: [PATCH] Use Image type for emoji icons. --- lib/pleroma/web/common_api/utils.ex | 2 +- test/web/common_api/common_api_utils_test.exs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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:" } ]