some basic expiration modal. "don't as again" doesn't work yet

This commit is contained in:
Henry Jameson 2025-06-12 20:04:39 +03:00
commit b9161ef697
17 changed files with 117 additions and 124 deletions

View file

@ -319,11 +319,19 @@ const unmuteConversation = ({ id, credentials }) => {
.then((data) => parseStatus(data))
}
const blockUser = ({ id, credentials }) => {
return fetch(MASTODON_BLOCK_USER_URL(id), {
headers: authHeaders(credentials),
method: 'POST'
}).then((data) => data.json())
const blockUser = ({ id, expiresIn, credentials }) => {
const payload = {}
if (expiresIn) {
payload.expires_in = expiresIn
}
console.log(payload)
return promisedRequest({
url: MASTODON_BLOCK_USER_URL(id),
credentials,
method: 'POST',
payload
})
}
const unblockUser = ({ id, credentials }) => {
@ -1172,7 +1180,13 @@ const muteUser = ({ id, expiresIn, credentials }) => {
if (expiresIn) {
payload.expires_in = expiresIn
}
return promisedRequest({ url: MASTODON_MUTE_USER_URL(id), credentials, method: 'POST', payload })
return promisedRequest({
url: MASTODON_MUTE_USER_URL(id),
credentials,
method: 'POST',
payload
})
}
const unmuteUser = ({ id, credentials }) => {