mastoapi blocks/mutes support. untested.

This commit is contained in:
Henry Jameson 2019-03-10 18:10:01 +02:00
parent 09736691ea
commit 1e81bb51df
1 changed files with 4 additions and 3 deletions

View File

@ -18,7 +18,6 @@ const MENTIONS_URL = '/api/statuses/mentions.json'
const DM_TIMELINE_URL = '/api/statuses/dm_timeline.json'
const FOLLOWERS_URL = '/api/statuses/followers.json'
const FRIENDS_URL = '/api/statuses/friends.json'
const BLOCKS_URL = '/api/statuses/blocks.json'
const FOLLOWING_URL = '/api/friendships/create.json'
const UNFOLLOWING_URL = '/api/friendships/destroy.json'
const QVITTER_USER_PREF_URL = '/api/qvitter/set_profile_pref.json'
@ -43,6 +42,8 @@ const DENY_USER_URL = '/api/pleroma/friendships/deny'
const SUGGESTIONS_URL = '/api/v1/suggestions'
const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites'
const MASTODON_USER_BLOCKS_URL = '/api/v1/blocks/'
const MASTODON_USER_MUTES_URL = '/api/v1/mutes/'
import { each, map } from 'lodash'
import { parseStatus, parseUser, parseNotification } from '../entity_normalizer/entity_normalizer.service.js'
@ -522,7 +523,7 @@ const changePassword = ({credentials, password, newPassword, newPasswordConfirma
}
const fetchMutes = ({credentials}) => {
const url = '/api/qvitter/mutes.json'
const url = MASTODON_USER_MUTES_URL
return fetch(url, {
headers: authHeaders(credentials)
@ -530,7 +531,7 @@ const fetchMutes = ({credentials}) => {
}
const fetchBlocks = ({page, credentials}) => {
return fetch(BLOCKS_URL, {
return fetch(MASTODON_USER_BLOCKS_URL, {
headers: authHeaders(credentials)
}).then((data) => {
if (data.ok) {