1
0
forked from mirror/misskey

refactor(ApPersonService.ts): より実情に即したas

This commit is contained in:
okayurisotto 2023-07-03 06:47:28 +09:00
parent 5190ef954c
commit f20381d06b

View File

@ -197,7 +197,7 @@ export class ApPersonService implements OnModuleInit {
*/
@bindThis
public async fetchPerson(uri: string): Promise<LocalUser | RemoteUser | null> {
const cached = this.cacheService.uriPersonCache.get(uri) as LocalUser | RemoteUser | null;
const cached = this.cacheService.uriPersonCache.get(uri) as LocalUser | RemoteUser | null | undefined;
if (cached) return cached;
// URIがこのサーバーを指しているならデータベースからフェッチ