Skip to content
Snippets Groups Projects
Commit ba9b04a8 authored by eal's avatar eal
Browse files

Use the API endpoint for emoji completion.

parent 447ec911
No related branches found
No related tags found
No related merge requests found
......@@ -103,12 +103,11 @@ window.fetch('/static/terms-of-service.html')
store.dispatch('setOption', { name: 'tos', value: html })
})
window.fetch('/static/emoji.txt')
.then((res) => res.text())
.then((csv) => {
const emoji = csv.split('\n').map((row) => {
const values = row.split(', ')
return { shortcode: values[0], image_url: values[1] }
window.fetch('/api/pleroma/emoji.json')
.then((res) => res.json())
.then((values) => {
const emoji = Object.keys(values).map((key) => {
return { shortcode: key, image_url: values[key] }
})
store.dispatch('setOption', { name: 'emoji', value: emoji })
})
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment