forked from AkkomaGang/akkoma
Use Image type for emoji icons.
This commit is contained in:
parent
1ed1ff17a4
commit
92caa2632b
2 changed files with 3 additions and 3 deletions
|
@ -203,7 +203,7 @@ def emoji_from_profile(%{info: info} = user) do
|
||||||
|> Enum.map(fn {shortcode, url} ->
|
|> Enum.map(fn {shortcode, url} ->
|
||||||
%{
|
%{
|
||||||
"type" => "Emoji",
|
"type" => "Emoji",
|
||||||
"icon" => %{"url" => "#{Endpoint.url()}#{url}"},
|
"icon" => %{"type" => "Image", "url" => "#{Endpoint.url()}#{url}"},
|
||||||
"name" => ":#{shortcode}:"
|
"name" => ":#{shortcode}:"
|
||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -37,12 +37,12 @@ test "parses emoji from name and bio" do
|
||||||
expected = [
|
expected = [
|
||||||
%{
|
%{
|
||||||
"type" => "Emoji",
|
"type" => "Emoji",
|
||||||
"icon" => %{"url" => "#{Endpoint.url()}/finmoji/128px/perkele-128.png"},
|
"icon" => %{"type" => "Image", "url" => "#{Endpoint.url()}/finmoji/128px/perkele-128.png"},
|
||||||
"name" => ":perkele:"
|
"name" => ":perkele:"
|
||||||
},
|
},
|
||||||
%{
|
%{
|
||||||
"type" => "Emoji",
|
"type" => "Emoji",
|
||||||
"icon" => %{"url" => "#{Endpoint.url()}/finmoji/128px/karjalanpiirakka-128.png"},
|
"icon" => %{"type" => "Image", "url" => "#{Endpoint.url()}/finmoji/128px/karjalanpiirakka-128.png"},
|
||||||
"name" => ":karjalanpiirakka:"
|
"name" => ":karjalanpiirakka:"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue