[backend/federation] Fix sporadic key fetch failures in InboxValidationMiddleware (ISH-194)
This commit is contained in:
parent
6dc4b29eba
commit
0c644f7b25
1 changed files with 3 additions and 0 deletions
|
@ -90,6 +90,9 @@ public class InboxValidationMiddleware(
|
|||
if (user == null) throw AuthFetchException.NotFound("Delete activity actor is unknown");
|
||||
key = await db.UserPublickeys.Include(p => p.User)
|
||||
.FirstOrDefaultAsync(p => p.User == user, ct);
|
||||
|
||||
// If the key is still null here, we have a data consistency issue and need to update the key manually
|
||||
key ??= await userSvc.UpdateUserPublicKeyAsync(user).WaitAsync(ct);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue