Skip old incoming events

This commit is contained in:
artur 2024-03-16 11:37:22 +03:00 committed by Mike Heier
parent 8fc3f48d09
commit 1ab11a5013

View File

@ -1219,6 +1219,8 @@ class Nip46Backend extends NDKNip46Backend {
}
async handleIncomingEvent(event) {
if (event.created_at < Date.now() / 1000 - 10) return;
const { id, method, params } = await this.rpc.parseEvent(event);
const remotePubkey = event.pubkey;
let response;