when processing an activity, refetch the user's public key if they don't already have one

This commit is contained in:
Hazelnoot 2025-09-14 09:01:07 -04:00
parent 58751020c8
commit 4a1693776f

View file

@ -164,7 +164,12 @@ export class InboxProcessorService implements OnApplicationShutdown {
// publicKey がなくても終了
if (authUser.key == null) {
throw new Bull.UnrecoverableError(`skip: failed to resolve user publicKey ${actorId}`);
// See if a key has become available since we fetched the actor
authUser.key = await this.apDbResolverService.refetchPublicKeyForApId(authUser.user);
if (authUser.key == null) {
// If it's still missing, then give up
throw new Bull.UnrecoverableError(`skip: failed to resolve user publicKey ${actorId}`);
}
}
// HTTP-Signatureの検証