commit: eeddceee6baa90c166cfafe2e9759f82d88017b2
parent: 01c5bae5948b69fa646284c711803fcb21772834
Author: lambda <pleromagit@rogerbraun.net>
Date: Sun, 12 Aug 2018 10:44:39 +0000
Merge branch 'fixRelativeEmojis' into 'develop'
Fixes broken custom emoji in autocomplete when proxying to remote BE
See merge request pleroma/pleroma-fe!300
Diffstat:
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
@@ -87,11 +87,11 @@ const PostStatusForm = {
return false
}
return map(take(matchedEmoji, 5), ({shortcode, image_url, utf}, index) => ({
- // eslint-disable-next-line camelcase
screen_name: `:${shortcode}:`,
name: '',
utf: utf || '',
- img: image_url,
+ // eslint-disable-next-line camelcase
+ img: utf ? '' : this.$store.state.config.server + image_url,
highlighted: index === this.highlighted
}))
} else {
diff --git a/src/main.js b/src/main.js
@@ -79,11 +79,12 @@ const i18n = new VueI18n({
window.fetch('/api/statusnet/config.json')
.then((res) => res.json())
.then((data) => {
- const {name, closed: registrationClosed, textlimit} = data.site
+ const {name, closed: registrationClosed, textlimit, server} = data.site
store.dispatch('setOption', { name: 'name', value: name })
store.dispatch('setOption', { name: 'registrationOpen', value: (registrationClosed === '0') })
store.dispatch('setOption', { name: 'textlimit', value: parseInt(textlimit) })
+ store.dispatch('setOption', { name: 'server', value: server })
})
window.fetch('/static/config.json')