Solve olm not having chance to send hp message

This commit is contained in:
Owen
2025-04-11 10:33:20 -04:00
parent 68ebdda1ff
commit e57574ba9c
2 changed files with 30 additions and 28 deletions

View File

@@ -63,8 +63,9 @@ export const handleOlmRegisterMessage: MessageHandler = async (context) => {
});
}
if (client.lastHolePunch && now - client.lastHolePunch > 6) {
if (now - (client.lastHolePunch || 0) > 6) {
logger.warn("Client last hole punch is too old, skipping all sites");
return;
}
// Update the client's public key