fix(backend): 古いユーザーキャッシュを使うことへの対策 (misskey-dev#13453)

Co-authored-by: tamaina <tamaina@hotmail.co.jp>
This commit is contained in:
まっちゃとーにゅ 2024-02-25 04:20:12 +09:00
parent 4a615ff251
commit 552354c895
No known key found for this signature in database
GPG key ID: 6AFBBF529601C1DB
7 changed files with 27 additions and 27 deletions

View file

@ -443,9 +443,9 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
this.hashtagService.updateUsertags(user, tags);
//#endregion
if (Object.keys(updates).length > 0) await this.usersRepository.update(user.id, updates);
if (Object.keys(updates).includes('alsoKnownAs')) {
this.cacheService.uriPersonCache.set(this.userEntityService.genLocalUserUri(user.id), { ...user, ...updates });
if (Object.keys(updates).length > 0) {
await this.usersRepository.update(user.id, updates);
this.globalEventService.publishInternalEvent('localUserUpdated', { id: user.id });
}
await this.userProfilesRepository.update(user.id, {