Add timed-mute functionality
This commit is contained in:
parent
95c15fca22
commit
228a9afdf5
7 changed files with 72 additions and 18 deletions
|
|
@ -1118,8 +1118,12 @@ const fetchMutes = ({ credentials }) => {
|
|||
.then((users) => users.map(parseUser))
|
||||
}
|
||||
|
||||
const muteUser = ({ id, credentials }) => {
|
||||
return promisedRequest({ url: MASTODON_MUTE_USER_URL(id), credentials, method: 'POST' })
|
||||
const muteUser = ({ id, expiresIn, credentials }) => {
|
||||
const payload = {}
|
||||
if (expiresIn) {
|
||||
payload['expires_in'] = expiresIn
|
||||
}
|
||||
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