This commit is contained in:
tamaina 2025-07-07 01:16:33 +09:00
parent a12ffc26a9
commit f1d49af1e2
1 changed files with 7 additions and 3 deletions

View File

@ -190,13 +190,17 @@ export class ApDbResolverService implements OnApplicationShutdown {
} }
const user = await this.apPersonService.resolvePerson(uri, undefined, true) as MiRemoteUser; const user = await this.apPersonService.resolvePerson(uri, undefined, true) as MiRemoteUser;
this.logger.debug(`getAuthUserFromApId: user resolved keyId=${keyId}`, { user }); this.logger.debug(`getAuthUserFromApId: User resolved uri=${uri} userId=${user.id} keyId=${keyId}`);
if (user.isDeleted) return { user: null, key: null };
if (user.isDeleted) {
this.logger.warn(`getAuthUserFromApId: User is deleted uri=${uri} userId=${user.id} keyId=${keyId}`);
return { user: null, key: null };
}
const keys = await this.getPublicKeyByUserId(user.id); const keys = await this.getPublicKeyByUserId(user.id);
if (keys == null || !Array.isArray(keys) || keys.length === 0) { if (keys == null || !Array.isArray(keys) || keys.length === 0) {
this.logger.warn(`getAuthUserFromApId:No key found uri=${uri} userId=${user.id} keys=${JSON.stringify(keys)}`); this.logger.warn(`getAuthUserFromApId: No key found uri=${uri} userId=${user.id} keys=${JSON.stringify(keys)}`);
return { user, key: null }; return { user, key: null };
} }