mirror of
https://github.com/funamitech/mastodon
synced 2024-12-02 00:38:33 +09:00
[Glitch] Fix being unable to react with the keycap number sign emoji (#2004)
Port of https://github.com/mastodon/mastodon/pull/22231
This commit is contained in:
parent
7ca0a71601
commit
719a0951af
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user