Revert "Revert "fix: 古いキャッシュを使うのを修正 (#13453)""

This reverts commit d64feb78d3.
This commit is contained in:
mattyatea 2024-04-16 07:32:42 +09:00
parent d64feb78d3
commit fe116be540
8 changed files with 28 additions and 28 deletions

View file

@ -461,9 +461,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, {