fix followers list
This commit is contained in:
parent
b9efa01c7a
commit
2310d1cd9b
2 changed files with 14 additions and 4 deletions
|
|
@ -117,9 +117,17 @@ export const fetchUserByName = ({ name, credentials }) =>
|
||||||
|
|
||||||
export const fetchFriends = ({ id, maxId, sinceId, limit = 20, credentials }) =>
|
export const fetchFriends = ({ id, maxId, sinceId, limit = 20, credentials }) =>
|
||||||
promisedRequest({
|
promisedRequest({
|
||||||
url: MASTODON_FOLLOWING_URL(id, { maxId, sinceId, limit }),
|
url: MASTODON_FOLLOWING_URL(id, {
|
||||||
|
maxId,
|
||||||
|
sinceId,
|
||||||
|
limit,
|
||||||
|
withRelationships: true,
|
||||||
|
}),
|
||||||
credentials,
|
credentials,
|
||||||
}).then(({ data, ...rest }) => ({ ...rest, data: data.map(parseUser) }))
|
}).then(({ data, ...rest }) => ({
|
||||||
|
...rest,
|
||||||
|
data: data.map(parseUser),
|
||||||
|
}))
|
||||||
|
|
||||||
export const fetchFollowers = ({
|
export const fetchFollowers = ({
|
||||||
id,
|
id,
|
||||||
|
|
@ -136,7 +144,10 @@ export const fetchFollowers = ({
|
||||||
withRelationships: true,
|
withRelationships: true,
|
||||||
}),
|
}),
|
||||||
credentials,
|
credentials,
|
||||||
}).then(({ data, ...rest }) => ({ ...rest, data: data.map(parseUser) }))
|
}).then(({ data, ...rest }) => ({
|
||||||
|
...rest,
|
||||||
|
data: data.map(parseUser),
|
||||||
|
}))
|
||||||
|
|
||||||
export const fetchConversation = ({ id, credentials }) =>
|
export const fetchConversation = ({ id, credentials }) =>
|
||||||
promisedRequest({
|
promisedRequest({
|
||||||
|
|
|
||||||
|
|
@ -410,7 +410,6 @@ export const exportFriends = ({ id, credentials }) => {
|
||||||
id,
|
id,
|
||||||
maxId,
|
maxId,
|
||||||
credentials,
|
credentials,
|
||||||
withRelationships: true,
|
|
||||||
})
|
})
|
||||||
friends = [...friends, ...users]
|
friends = [...friends, ...users]
|
||||||
if (users.length === 0) {
|
if (users.length === 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue