diff --git a/changelog.d/followers-list.fix b/changelog.d/followers-list.fix new file mode 100644 index 000000000..51e96f90c --- /dev/null +++ b/changelog.d/followers-list.fix @@ -0,0 +1 @@ +Fix followers list showing followed users as non-followed diff --git a/src/api/public.js b/src/api/public.js index 78db90bfe..5684298e4 100644 --- a/src/api/public.js +++ b/src/api/public.js @@ -117,9 +117,17 @@ export const fetchUserByName = ({ name, credentials }) => export const fetchFriends = ({ id, maxId, sinceId, limit = 20, credentials }) => promisedRequest({ - url: MASTODON_FOLLOWING_URL(id, { maxId, sinceId, limit }), + url: MASTODON_FOLLOWING_URL(id, { + maxId, + sinceId, + limit, + withRelationships: true, + }), credentials, - }).then(({ data, ...rest }) => ({ ...rest, data: data.map(parseUser) })) + }).then(({ data, ...rest }) => ({ + ...rest, + data: data.map(parseUser), + })) export const fetchFollowers = ({ id, @@ -136,7 +144,10 @@ export const fetchFollowers = ({ withRelationships: true, }), credentials, - }).then(({ data, ...rest }) => ({ ...rest, data: data.map(parseUser) })) + }).then(({ data, ...rest }) => ({ + ...rest, + data: data.map(parseUser), + })) export const fetchConversation = ({ id, credentials }) => promisedRequest({ diff --git a/src/api/user.js b/src/api/user.js index 8086d6d7f..ce9da977d 100644 --- a/src/api/user.js +++ b/src/api/user.js @@ -410,7 +410,6 @@ export const exportFriends = ({ id, credentials }) => { id, maxId, credentials, - withRelationships: true, }) friends = [...friends, ...users] if (users.length === 0) {