diff options
author | Rachel H <rainyday@users.noreply.github.com> | 2017-04-13 07:03:45 -0700 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-13 16:03:45 +0200 |
commit | 9362700137d7fb4b0cddf425d5a2de353f7ab242 (patch) | |
tree | 22f26c4bd7207393da08d88dd50fe6eef21edeb0 /app/assets/javascripts/components/actions | |
parent | 1206627c5957c9c2afea7126dbe6d44e2b00a849 (diff) |
Convert emoji shortnames when sending status (#1666)
Diffstat (limited to 'app/assets/javascripts/components/actions')
-rw-r--r-- | app/assets/javascripts/components/actions/compose.jsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/components/actions/compose.jsx b/app/assets/javascripts/components/actions/compose.jsx index 1b3cc60dc..88e91c356 100644 --- a/app/assets/javascripts/components/actions/compose.jsx +++ b/app/assets/javascripts/components/actions/compose.jsx @@ -2,6 +2,8 @@ import api from '../api'; import { updateTimeline } from './timelines'; +import * as emojione from 'emojione'; + export const COMPOSE_CHANGE = 'COMPOSE_CHANGE'; export const COMPOSE_SUBMIT_REQUEST = 'COMPOSE_SUBMIT_REQUEST'; export const COMPOSE_SUBMIT_SUCCESS = 'COMPOSE_SUBMIT_SUCCESS'; @@ -72,9 +74,8 @@ export function mentionCompose(account, router) { export function submitCompose() { return function (dispatch, getState) { dispatch(submitComposeRequest()); - api(getState).post('/api/v1/statuses', { - status: getState().getIn(['compose', 'text'], ''), + status: emojione.shortnameToUnicode(getState().getIn(['compose', 'text'], '')), in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null), media_ids: getState().getIn(['compose', 'media_attachments']).map(item => item.get('id')), sensitive: getState().getIn(['compose', 'sensitive']), |