diff options
Diffstat (limited to 'app/lib/nostr/client.hoon')
| -rw-r--r-- | app/lib/nostr/client.hoon | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/lib/nostr/client.hoon b/app/lib/nostr/client.hoon index 41c3080..2438a47 100644 --- a/app/lib/nostr/client.hoon +++ b/app/lib/nostr/client.hoon @@ -48,9 +48,9 @@ ++ get-posts ^- (quip card _state) =/ kinds (silt ~[1]) - =/ last-week (sub now.bowl ~d7) + =/ since (sub now.bowl ~m1) :: =/ since (to-unix-secs:jikan:sr last-week) - =/ =filter:nsur [~ ~ `kinds ~ `last-week ~ ~] + =/ =filter:nsur [~ ~ `kinds ~ `since ~ ~] (send-req ~[filter]) ++ get-user-feed @@ -92,7 +92,7 @@ ++ test-connection |= relay-url=@t =/ kinds (silt ~[1]) - =/ since (sub now.bowl ~h1) + =/ since (sub now.bowl ~m1) =/ =filter:nsur [~ ~ `kinds ~ `since ~ ~] =/ sub-id (gen-sub-id:nostr-keys eny.bowl) =/ req=client-msg:nsur [%req sub-id ~[filter]] @@ -103,14 +103,14 @@ ~& >>> send=relay-url =/ req-body=json (req:en:js req) =/ octs (json-to-octs:server req-body) - =/ wev=websocket-event:eyre [%message 1 `octs] + =/ wmsg=websocket-message:eyre [1 `octs] =/ conn (check-connected:ws relay-url bowl) ~& >>> send-client-conn=conn ?~ conn :: if no ws connection we start a thread which will connect first, then send the message =/ pat /to-nostr-relay - [%pass (weld /ws pat) %arvo %k %fard dap.bowl %ws %noun !>([relay-url wev])] + [%pass (weld /ws pat) %arvo %k %fard dap.bowl %ws %noun !>([relay-url wmsg])] :: - (give-ws-payload-client:ws id.u.conn [1 `octs]) + (give-ws-payload-client:ws id.u.conn wmsg) :: ++ send-http |
