Merge branch 'develop' into fix/hashtag-opening
This commit is contained in:
commit
fc26f1852e
38 changed files with 1491 additions and 78 deletions
|
@ -130,7 +130,7 @@ const updateBanner = ({credentials, params}) => {
|
|||
// description
|
||||
const updateProfile = ({credentials, params}) => {
|
||||
// Always include these fields, because they might be empty or false
|
||||
const fields = ['description', 'locked', 'no_rich_text', 'hide_network']
|
||||
const fields = ['description', 'locked', 'no_rich_text', 'hide_follows', 'hide_followers', 'show_role']
|
||||
let url = PROFILE_UPDATE_URL
|
||||
|
||||
const form = new FormData()
|
||||
|
@ -257,6 +257,13 @@ const fetchFriends = ({id, page, credentials}) => {
|
|||
.then((data) => data.map(parseUser))
|
||||
}
|
||||
|
||||
const exportFriends = ({id, credentials}) => {
|
||||
let url = `${FRIENDS_URL}?user_id=${id}&export=true`
|
||||
return fetch(url, { headers: authHeaders(credentials) })
|
||||
.then((data) => data.json())
|
||||
.then((data) => data.map(parseUser))
|
||||
}
|
||||
|
||||
const fetchFollowers = ({id, page, credentials}) => {
|
||||
let url = `${FOLLOWERS_URL}?user_id=${id}`
|
||||
if (page) {
|
||||
|
@ -536,6 +543,7 @@ const apiService = {
|
|||
fetchConversation,
|
||||
fetchStatus,
|
||||
fetchFriends,
|
||||
exportFriends,
|
||||
fetchFollowers,
|
||||
followUser,
|
||||
unfollowUser,
|
||||
|
|
|
@ -14,6 +14,10 @@ const backendInteractorService = (credentials) => {
|
|||
return apiService.fetchFriends({id, page, credentials})
|
||||
}
|
||||
|
||||
const exportFriends = ({id}) => {
|
||||
return apiService.exportFriends({id, credentials})
|
||||
}
|
||||
|
||||
const fetchFollowers = ({id, page}) => {
|
||||
return apiService.fetchFollowers({id, page, credentials})
|
||||
}
|
||||
|
@ -78,6 +82,7 @@ const backendInteractorService = (credentials) => {
|
|||
fetchStatus,
|
||||
fetchConversation,
|
||||
fetchFriends,
|
||||
exportFriends,
|
||||
fetchFollowers,
|
||||
followUser,
|
||||
unfollowUser,
|
||||
|
|
|
@ -90,6 +90,8 @@ export const parseUser = (data) => {
|
|||
output.statusnet_blocking = data.statusnet_blocking
|
||||
|
||||
output.is_local = data.is_local
|
||||
output.role = data.role
|
||||
output.show_role = data.show_role
|
||||
|
||||
output.follows_you = data.follows_you
|
||||
|
||||
|
@ -100,7 +102,8 @@ export const parseUser = (data) => {
|
|||
output.rights = data.rights
|
||||
output.no_rich_text = data.no_rich_text
|
||||
output.default_scope = data.default_scope
|
||||
output.hide_network = data.hide_network
|
||||
output.hide_follows = data.hide_follows
|
||||
output.hide_followers = data.hide_followers
|
||||
output.background_image = data.background_image
|
||||
// on mastoapi this info is contained in a "relationship"
|
||||
output.following = data.following
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue