From a6e9198e864f34cc498416c792bc5f933b7978d6 Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Fri, 6 Sep 2024 11:21:35 +0200 Subject: [PATCH] Actually only print last message --- main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.ts b/main.ts index 2df0e0e..5c253f4 100644 --- a/main.ts +++ b/main.ts @@ -54,7 +54,7 @@ const relay = new NRelay1(relay_str); console.log("\nAs a sanity check, here's your last message (if any):"); -for await (const msg of relay.req([{ kinds: [1], limit: 960, authors: [pubkey_hex] }])) { +for await (const msg of relay.req([{ kinds: [1], limit: 1, authors: [pubkey_hex] }])) { if (msg[0] === 'EVENT') console.log(msg[2].content); if (msg[0] === 'EOSE') break; }