Fix emoji reactions

This commit is contained in:
Essem 2024-01-06 21:07:15 -06:00
parent 92eb414907
commit a3ae2aad5b
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 6 additions and 6 deletions

View file

@ -544,7 +544,7 @@ export const mutations = {
count: reaction.count + 1,
me: true,
accounts: [
...reaction.accounts,
//...reaction.accounts,
currentUser
]
}
@ -734,7 +734,7 @@ const statuses = {
if (!currentUser) return
commit('addOwnReaction', { id, emoji, currentUser })
rootState.api.backendInteractor.reactWithEmoji({ id, emoji }).then(
rootState.api.backendInteractor.reactWithEmoji({ id, emoji: emoji.replaceAll(':', '') }).then(
ok => {
dispatch('fetchEmojiReactionsBy', id)
}
@ -745,7 +745,7 @@ const statuses = {
if (!currentUser) return
commit('removeOwnReaction', { id, emoji, currentUser })
rootState.api.backendInteractor.unreactWithEmoji({ id, emoji }).then(
rootState.api.backendInteractor.unreactWithEmoji({ id, emoji: emoji.replaceAll(':', '') }).then(
ok => {
dispatch('fetchEmojiReactionsBy', id)
}

View file

@ -101,7 +101,7 @@ const MASTODON_ANNOUNCEMENTS_URL = '/api/v1/announcements'
const MASTODON_ANNOUNCEMENTS_DISMISS_URL = id => `/api/v1/announcements/${id}/dismiss`
const PLEROMA_EMOJI_REACTIONS_URL = id => `/api/v1/statuses/${id}/reactions`
const PLEROMA_EMOJI_REACT_URL = (id, emoji) => `/api/v1/statuses/${id}/react/${emoji}`
const PLEROMA_EMOJI_UNREACT_URL = (id, emoji) => `/api/v1/statuses/${id}/react/${emoji}`
const PLEROMA_EMOJI_UNREACT_URL = (id, emoji) => `/api/v1/statuses/${id}/unreact/${emoji}`
const PLEROMA_BACKUP_URL = '/api/v1/pleroma/backups'
const PLEROMA_ANNOUNCEMENTS_URL = '/api/v1/pleroma/admin/announcements'
const PLEROMA_POST_ANNOUNCEMENT_URL = '/api/v1/pleroma/admin/announcements'
@ -1341,7 +1341,7 @@ const fetchEmojiReactions = ({ id, credentials }) => {
const reactWithEmoji = ({ id, emoji, credentials }) => {
return promisedRequest({
url: PLEROMA_EMOJI_REACT_URL(id, encodeURIComponent(emoji)),
method: 'PUT',
method: 'POST',
credentials
}).then(parseStatus)
}
@ -1349,7 +1349,7 @@ const reactWithEmoji = ({ id, emoji, credentials }) => {
const unreactWithEmoji = ({ id, emoji, credentials }) => {
return promisedRequest({
url: PLEROMA_EMOJI_UNREACT_URL(id, encodeURIComponent(emoji)),
method: 'DELETE',
method: 'POST',
credentials
}).then(parseStatus)
}