move uriPersonCache to ApPersonService
This commit is contained in:
parent
e1044879ea
commit
18b909a10c
2 changed files with 2 additions and 2 deletions
|
|
@ -144,7 +144,7 @@ export class RemoteUserResolveService {
|
||||||
|
|
||||||
// Update URI
|
// Update URI
|
||||||
await this.usersRepository.update({ id: user.id }, { uri: href }); // Update the user
|
await this.usersRepository.update({ id: user.id }, { uri: href }); // Update the user
|
||||||
await this.cacheService.uriPersonCache.delete(user.uri); // Unmap the old URI
|
await this.apPersonService.uriPersonCache.delete(user.uri); // Unmap the old URI
|
||||||
await this.internalEventService.emit('remoteUserUpdated', { id: user.id }); // Update caches
|
await this.internalEventService.emit('remoteUserUpdated', { id: user.id }); // Update caches
|
||||||
|
|
||||||
this.logger.info(`Corrected URI for ${acct} from ${user.uri} to ${href}`);
|
this.logger.info(`Corrected URI for ${acct} from ${user.uri} to ${href}`);
|
||||||
|
|
|
||||||
|
|
@ -306,7 +306,7 @@ export class ApPersonService implements OnModuleInit {
|
||||||
if (parsed.local) {
|
if (parsed.local) {
|
||||||
userId = parsed.type === 'users' ? parsed.id : null;
|
userId = parsed.type === 'users' ? parsed.id : null;
|
||||||
} else {
|
} else {
|
||||||
userId = await this.cacheService.uriPersonCache.fetch(uri).catch(() => null);
|
userId = await this.uriPersonCache.fetch(uri).catch(() => null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// No match
|
// No match
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue