Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
92caa263
Commit
92caa263
authored
Aug 13, 2018
by
eal
Browse files
Use Image type for emoji icons.
parent
1ed1ff17
Pipeline
#3026
failed with stages
in 2 minutes and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/common_api/utils.ex
View file @
92caa263
...
...
@@ -203,7 +203,7 @@ def emoji_from_profile(%{info: info} = user) do
|>
Enum
.
map
(
fn
{
shortcode
,
url
}
->
%{
"type"
=>
"Emoji"
,
"icon"
=>
%{
"url"
=>
"
#{
Endpoint
.
url
()
}#{
url
}
"
},
"icon"
=>
%{
"type"
=>
"Image"
,
"url"
=>
"
#{
Endpoint
.
url
()
}#{
url
}
"
},
"name"
=>
":
#{
shortcode
}
:"
}
end
)
...
...
test/web/common_api/common_api_utils_test.exs
View file @
92caa263
...
...
@@ -37,12 +37,12 @@ test "parses emoji from name and bio" 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:"
}
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment