diff options
author | Jeremy Kescher <jeremy@kescher.at> | 2022-12-17 10:34:39 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-17 11:34:39 +0100 |
commit | 719a0951afeee77adb61a90b1cd35a86f1de6280 (patch) | |
tree | 4de892936dde5e67ba660da91582208a45a562cf /app | |
parent | 7ca0a71601f92064db64862c8cab46a77d9c3d3d (diff) |
[Glitch] Fix being unable to react with the keycap number sign emoji (#2004)
Port of https://github.com/mastodon/mastodon/pull/22231
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/flavours/glitch/actions/announcements.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/javascript/flavours/glitch/actions/announcements.js b/app/javascript/flavours/glitch/actions/announcements.js index 1bdea909f..586dcfd33 100644 --- a/app/javascript/flavours/glitch/actions/announcements.js +++ b/app/javascript/flavours/glitch/actions/announcements.js @@ -102,7 +102,7 @@ export const addReaction = (announcementId, name) => (dispatch, getState) => { dispatch(addReactionRequest(announcementId, name, alreadyAdded)); } - api(getState).put(`/api/v1/announcements/${announcementId}/reactions/${name}`).then(() => { + api(getState).put(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => { dispatch(addReactionSuccess(announcementId, name, alreadyAdded)); }).catch(err => { if (!alreadyAdded) { @@ -136,7 +136,7 @@ export const addReactionFail = (announcementId, name, error) => ({ export const removeReaction = (announcementId, name) => (dispatch, getState) => { dispatch(removeReactionRequest(announcementId, name)); - api(getState).delete(`/api/v1/announcements/${announcementId}/reactions/${name}`).then(() => { + api(getState).delete(`/api/v1/announcements/${announcementId}/reactions/${encodeURIComponent(name)}`).then(() => { dispatch(removeReactionSuccess(announcementId, name)); }).catch(err => { dispatch(removeReactionFail(announcementId, name, err)); |