some basic expiration modal. "don't as again" doesn't work yet
This commit is contained in:
parent
60e5c3b042
commit
b9161ef697
17 changed files with 117 additions and 124 deletions
|
|
@ -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 }) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue