This commit is contained in:
tamaina 2023-07-19 07:03:30 +00:00
parent 4c83663597
commit a2f6bf3d5c

View file

@ -352,6 +352,15 @@ export class ApPersonService implements OnModuleInit {
// Register to the cache // Register to the cache
this.cacheService.uriPersonCache.set(user.uri, user); this.cacheService.uriPersonCache.set(user.uri, user);
// Register host
this.federatedInstanceService.fetch(host).then(async i => {
this.instancesRepository.increment({ id: i.id }, 'usersCount', 1);
this.fetchInstanceMetadataService.fetchInstanceMetadata(i);
if ((await this.metaService.fetch()).enableChartsForFederatedInstances) {
this.instanceChart.newUser(i.host);
}
});
//#region アバターとヘッダー画像をフェッチ //#region アバターとヘッダー画像をフェッチ
try { try {
const updates = await this.resolveAvatarAndBanner(user, person.icon, person.image); const updates = await this.resolveAvatarAndBanner(user, person.icon, person.image);
@ -365,15 +374,6 @@ export class ApPersonService implements OnModuleInit {
} }
//#endregion //#endregion
// Register host
this.federatedInstanceService.fetch(host).then(async i => {
this.instancesRepository.increment({ id: i.id }, 'usersCount', 1);
this.fetchInstanceMetadataService.fetchInstanceMetadata(i);
if ((await this.metaService.fetch()).enableChartsForFederatedInstances) {
this.instanceChart.newUser(i.host);
}
});
this.usersChart.update(user, true); this.usersChart.update(user, true);
// ハッシュタグ更新 // ハッシュタグ更新