diff options
| author | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-01-25 23:49:16 +0000 |
|---|---|---|
| committer | HJ <30-hj@users.noreply.git.pleroma.social> | 2023-01-25 23:49:16 +0000 |
| commit | 65e10f07def87f0c4399dbce92eb00b430d5dba4 (patch) | |
| tree | 02d8646054b4f3647cee9938d82c2e9e3a70312b /src/services/api/api.service.js | |
| parent | a9716701be26c696ee1b908a1787b34880175ffa (diff) | |
| parent | c7c68340f1c8838cead855de3f624e0796fbc6c7 (diff) | |
Merge branch 'from/develop/tusooa/confirm-dialogs' into 'develop'
Confirmation dialogs
See merge request pleroma/pleroma-fe!1431
Diffstat (limited to 'src/services/api/api.service.js')
| -rw-r--r-- | src/services/api/api.service.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index af12265e..b8c10b21 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -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 }) => { |
