mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-25 11:27:31 -07:00
[mastodon-client] Fix verify_credentials occasionally showing outdated data
This commit is contained in:
parent
01b5af2686
commit
5d17996d5f
1 changed files with 2 additions and 1 deletions
|
@ -192,7 +192,8 @@ export class UserHelpers {
|
|||
}
|
||||
|
||||
public static async verifyCredentials(user: ILocalUser): Promise<MastodonEntity.Account> {
|
||||
const acct = UserConverter.encode(user);
|
||||
// re-fetch local user because auth user possibly contains outdated info
|
||||
const acct = getUser(user.id).then(u => UserConverter.encode(u));
|
||||
const profile = UserProfiles.findOneByOrFail({userId: user.id});
|
||||
const privacy = this.getDefaultNoteVisibility(user);
|
||||
const fields = profile.then(profile => profile.fields.map(field => {
|
||||
|
|
Loading…
Reference in a new issue