fix: properly supply resolver

This commit is contained in:
Johann150 2022-12-08 18:12:05 +01:00
parent 73870e85cd
commit e2ce599aca
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -102,7 +102,7 @@ function validateActor(x: IObject, uri: string): IActor {
*
* If the target Person is registered in FoundKey, it is returned.
*/
export async function fetchPerson(uri: string, resolver?: Resolver): Promise<CacheableUser | null> {
export async function fetchPerson(uri: string, resolver: Resolver): Promise<CacheableUser | null> {
if (typeof uri !== 'string') throw new Error('uri is not string');
const cached = uriPersonCache.get(uri);
@ -390,7 +390,7 @@ export async function resolvePerson(uri: string, resolver: Resolver): Promise<Ca
if (typeof uri !== 'string') throw new Error('uri is not string');
//#region このサーバーに既に登録されていたらそれを返す
const exist = await fetchPerson(uri);
const exist = await fetchPerson(uri, resolver);
if (exist) {
return exist;