summaryrefslogtreecommitdiff
path: root/app/lib/nostr/client.hoon
diff options
context:
space:
mode:
authorpolwex <polwex@sortug.com>2025-11-19 05:47:15 +0700
committerpolwex <polwex@sortug.com>2025-11-19 05:47:15 +0700
commite6e657be3a3b1dae426b46f3bc16f9a5cf4861c2 (patch)
tree8c04343c4b13861f2124b34f16652418e671e423 /app/lib/nostr/client.hoon
parent4bad4b5705144b6a537053c68c3c2c3f5984de85 (diff)
Improvements to handling nostr post on backend
Diffstat (limited to 'app/lib/nostr/client.hoon')
-rw-r--r--app/lib/nostr/client.hoon8
1 files changed, 5 insertions, 3 deletions
diff --git a/app/lib/nostr/client.hoon b/app/lib/nostr/client.hoon
index 259852e..2ed5b0a 100644
--- a/app/lib/nostr/client.hoon
+++ b/app/lib/nostr/client.hoon
@@ -47,9 +47,10 @@
++ get-user-feed
|= pubkey=@ux
=/ kinds (silt ~[1])
- :: =/ since (to-unix-secs:jikan:sr last-week)
+ :: =/ since (sub now.bowl ~d30)
+ =/ since (sub now.bowl ~d5)
=/ pubkeys (silt ~[pubkey])
- =/ =filter:nsur [~ `pubkeys `kinds ~ ~ ~ ~]
+ =/ =filter:nsur [~ `pubkeys `kinds ~ `since ~ ~]
(send-req ~[filter] `.n ~)
++ get-thread |= id=@ux
@@ -60,6 +61,7 @@
=/ tag ['e' ids]
=/ tags=(map @t (list @t)) (malt :~(tag))
=/ f2=filter:nsur [~ ~ `kinds `tags ~ ~ ~]
+ ~& >>> getting-thread=[f1 f2]
(send-req ~[f1 f2] `.n ~)
++ get-post |= id=@ux
@@ -139,7 +141,7 @@
++ send
|= [relay-url=@t req=client-msg:nsur] ^- card
- ~& >>> sendws=relay-url
+ ~& >>> sendws=[relay-url req]
=/ req-body=json (req:en:js req)
=/ octs (json-to-octs:server req-body)
=/ wmsg=websocket-message:eyre [1 `octs]