mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-25 05:29:07 +01:00
[backend] Catch errors in refetchPublicKeyForApId
This commit is contained in:
parent
3b85491ee4
commit
9b13ec9c0c
@ -206,12 +206,17 @@ export default class DbResolver {
|
||||
}
|
||||
|
||||
public async refetchPublicKeyForApId(user: CacheableRemoteUser): Promise<UserPublickey | null> {
|
||||
await updatePerson(user.uri!, undefined, undefined, user);
|
||||
let key = await UserPublickeys.findOneBy({ userId: user.id });
|
||||
if (key != null) {
|
||||
await publicKeyByUserIdCache.set(user.id, key);
|
||||
try {
|
||||
await updatePerson(user.uri!, undefined, undefined, user);
|
||||
let key = await UserPublickeys.findOneBy({ userId: user.id });
|
||||
if (key != null) {
|
||||
await publicKeyByUserIdCache.set(user.id, key);
|
||||
}
|
||||
return key;
|
||||
}
|
||||
catch {
|
||||
return null;
|
||||
}
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user