Merge branch 'timed-user-mutes' into 'develop'
Timed user mutes See merge request pleroma/pleroma-fe!2197
This commit is contained in:
commit
e747ee896e
30 changed files with 513 additions and 188 deletions
|
|
@ -320,11 +320,18 @@ 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
|
||||
}
|
||||
|
||||
return promisedRequest({
|
||||
url: MASTODON_BLOCK_USER_URL(id),
|
||||
credentials,
|
||||
method: 'POST',
|
||||
payload
|
||||
})
|
||||
}
|
||||
|
||||
const unblockUser = ({ id, credentials }) => {
|
||||
|
|
@ -1174,7 +1181,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 }) => {
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ export const parseUser = (data) => {
|
|||
output.screen_name = data.acct
|
||||
output.fqn = data.fqn
|
||||
output.statusnet_profile_url = data.url
|
||||
output.mute_expires_at = data.mute_expires_at
|
||||
output.block_expires_at = data.block_expires_at
|
||||
|
||||
// There's nothing else to get
|
||||
if (mastoShort) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue