mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -07:00
[mastodon-client] Fix own user following/followers when ffVisibility is restricted
This commit is contained in:
parent
97067648e8
commit
dd0875e517
1 changed files with 10 additions and 8 deletions
|
@ -83,10 +83,11 @@ export class UserHelpers {
|
|||
|
||||
const profile = await UserProfiles.findOneByOrFail({ userId: user.id });
|
||||
if (profile.ffVisibility === "private") {
|
||||
if (!localUser || user.id != localUser.id) return { data: [] };
|
||||
if (!localUser || user.id !== localUser.id) return { data: [] };
|
||||
}
|
||||
else if (profile.ffVisibility === "followers") {
|
||||
if (!localUser) return { data: [] };
|
||||
if (user.id !== localUser.id) {
|
||||
const isFollowed = await Followings.exist({
|
||||
where: {
|
||||
followeeId: user.id,
|
||||
|
@ -95,6 +96,7 @@ export class UserHelpers {
|
|||
});
|
||||
if (!isFollowed) return { data: [] };
|
||||
}
|
||||
}
|
||||
|
||||
const query = PaginationHelpers.makePaginationQuery(
|
||||
Followings.createQueryBuilder("following"),
|
||||
|
|
Loading…
Reference in a new issue