added support hide\show reblogs from a specific user

This commit is contained in:
Maksim Pechnikov 2019-09-21 16:24:47 +03:00
parent 9b163d2816
commit 8721fb57fc
8 changed files with 58 additions and 6 deletions

View file

@ -219,9 +219,12 @@ const authHeaders = (accessToken) => {
}
}
const followUser = ({ id, credentials }) => {
const followUser = ({ id, reblogs, credentials }) => {
let url = MASTODON_FOLLOW_URL(id)
const form = new FormData()
if (reblogs !== undefined) { form.append('reblogs', reblogs) }
return fetch(url, {
body: form,
headers: authHeaders(credentials),
method: 'POST'
}).then((data) => data.json())