mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 09:27:31 -07:00
[backend/masto-client] Add follow_requests_count to verify_credentials response
This commit is contained in:
parent
671b52c663
commit
2ebd907c47
1 changed files with 2 additions and 0 deletions
|
@ -215,6 +215,7 @@ export class UserHelpers {
|
|||
const user = ctx.user as ILocalUser;
|
||||
const acct = UserConverter.encode(user, ctx);
|
||||
const profile = UserProfiles.findOneByOrFail({ userId: user.id });
|
||||
const followRequests = FollowRequests.count({ where: { followeeId: user.id } });
|
||||
const privacy = this.getDefaultNoteVisibility(ctx);
|
||||
const fields = profile.then(profile => profile.fields.map(field => {
|
||||
return {
|
||||
|
@ -229,6 +230,7 @@ export class UserHelpers {
|
|||
privacy: privacy.then(p => VisibilityConverter.encode(p)),
|
||||
sensitive: profile.then(p => p.alwaysMarkNsfw),
|
||||
language: profile.then(p => p.lang ?? ''),
|
||||
follow_requests_count: followRequests,
|
||||
};
|
||||
|
||||
const result = {
|
||||
|
|
Loading…
Reference in a new issue