fix retweet and favorites

This commit is contained in:
CoolElectronics 2024-06-12 17:00:01 -04:00
parent 54b440b9f5
commit 00b523ddac
No known key found for this signature in database
GPG key ID: F63593D168636C50
2 changed files with 6 additions and 5 deletions

View file

@ -30,7 +30,8 @@
v-if="!mergedConfig.hidePostStats && status.fave_num > 0" v-if="!mergedConfig.hidePostStats && status.fave_num > 0"
class="action-counter" class="action-counter"
> >
{{ status.fave_num }} <!-- SHARKEY-SPECIFIC: disable favorite count because devs make them hearts for some reason -->
<!-- {{ status.fave_num }} -->
</span> </span>
</div> </div>
</template> </template>

View file

@ -814,22 +814,22 @@ const verifyCredentials = (user) => {
} }
const favorite = ({ id, credentials }) => { const favorite = ({ id, credentials }) => {
return promisedRequest({ url: MASTODON_FAVORITE_URL(id), method: 'POST', credentials }) return promisedRequest({ url: MASTODON_FAVORITE_URL(id), method: 'POST', credentials, payload: {} })
.then((data) => parseStatus(data)) .then((data) => parseStatus(data))
} }
const unfavorite = ({ id, credentials }) => { const unfavorite = ({ id, credentials }) => {
return promisedRequest({ url: MASTODON_UNFAVORITE_URL(id), method: 'POST', credentials }) return promisedRequest({ url: MASTODON_UNFAVORITE_URL(id), method: 'POST', credentials, payload: {} })
.then((data) => parseStatus(data)) .then((data) => parseStatus(data))
} }
const retweet = ({ id, credentials }) => { const retweet = ({ id, credentials }) => {
return promisedRequest({ url: MASTODON_RETWEET_URL(id), method: 'POST', credentials }) return promisedRequest({ url: MASTODON_RETWEET_URL(id), method: 'POST', credentials, payload: {} })
.then((data) => parseStatus(data)) .then((data) => parseStatus(data))
} }
const unretweet = ({ id, credentials }) => { const unretweet = ({ id, credentials }) => {
return promisedRequest({ url: MASTODON_UNRETWEET_URL(id), method: 'POST', credentials }) return promisedRequest({ url: MASTODON_UNRETWEET_URL(id), method: 'POST', credentials, payload: {} })
.then((data) => parseStatus(data)) .then((data) => parseStatus(data))
} }