Skip to content

Commit

Permalink
[Glitch] Fix being unable to react with the keycap number sign emoji (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kescherCode committed Dec 17, 2022
1 parent 7ca0a71 commit 719a095
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/javascript/flavours/glitch/actions/announcements.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 719a095

Please sign in to comment.