fix last time limit for public key refetch
This commit is contained in:
parent
0b6f029467
commit
36835b4a2e
1 changed files with 1 additions and 1 deletions
|
|
@ -130,9 +130,9 @@ export class ApDbResolverService implements OnApplicationShutdown {
|
|||
@bindThis
|
||||
public async refetchPublicKeyForApId(user: MiRemoteUser): Promise<MiUserPublickey | null> {
|
||||
// Don't re-fetch if we've updated the user recently
|
||||
const maxUpdatedTime = this.timeService.now - 60_000; // 1 minute ago
|
||||
if (
|
||||
(user.lastFetchedAt && user.lastFetchedAt.valueOf() > maxUpdatedTime) ||
|
||||
const maxUpdatedTime = this.timeService.now - (1000 * 60 * 60); // 1 hour
|
||||
(user.updatedAt && user.updatedAt.valueOf() > maxUpdatedTime) ||
|
||||
this.idService.parse(user.id).date.valueOf() > maxUpdatedTime
|
||||
) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue