diff options
| author | polwex <polwex@sortug.com> | 2025-11-18 16:58:46 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-11-18 16:58:46 +0700 |
| commit | 76f99af3c98a689441315b5ed087c4b83c083191 (patch) | |
| tree | b51182eda47f4b3311c352a86d8256e417af4db5 /app/sur | |
| parent | a465c73178dc621578d10312f263355f0f2d5309 (diff) | |
refactooooring
Diffstat (limited to 'app/sur')
| -rw-r--r-- | app/sur/nostr.hoon | 10 | ||||
| -rw-r--r-- | app/sur/nostrill.hoon | 16 |
2 files changed, 21 insertions, 5 deletions
diff --git a/app/sur/nostr.hoon b/app/sur/nostr.hoon index b363cb9..b8f1e7d 100644 --- a/app/sur/nostr.hoon +++ b/app/sur/nostr.hoon @@ -33,9 +33,13 @@ $: start=@da reqs=(map sub-id event-stats) == +$ event-stats - :: if not ongoing we kill the subscription on %eose +$: filters=(list filter) + received=event-count + :: if not ongoing we kill the subscription on %eose. If ongoing we turn to .y after %eose + ongoing=(unit ?) :: if chunked we trigger a new subscription on %eose - [filters=(list filter) received=event-count ongoing=? chunked=(list filter)] + chunked=(list filter) +== +$ sub-id @t +$ event-count @ud @@ -48,7 +52,7 @@ $: sub-id=@t $: ids=(unit (set @ux)) authors=(unit (set @ux)) kinds=(unit (set @ud)) - tags=(unit (map @t (set @t))) + tags=(unit (map @t (list @t))) since=(unit @da) until=(unit @da) limit=(unit @ud) diff --git a/app/sur/nostrill.hoon b/app/sur/nostrill.hoon index c06c20c..b6aeb3a 100644 --- a/app/sur/nostrill.hoon +++ b/app/sur/nostrill.hoon @@ -88,18 +88,30 @@ $% [%reply p=post:tp] $% [%add p=@t] [%del p=@ud] :: - [%sync ~] + relay-handling + == + +$ relay-handling + $% [%sync ~] + [%user pubkey=@ux] + [%thread id=@ux] :: send event for... relaying [%send host=@p id=@ relays=(list @t)] == :: facts +$ fact - $% [%nostr feed=nostr-feed] + $% [%nostr nostr-fact] [%post post-fact] [%enga p=post-wrapper reaction=*] [%fols fols-fact] [%hark =notif] == + +$ nostr-fact + $% [%feed feed=nostr-feed] + [%user feed=nostr-feed] + [%thread feed=nostr-feed] + [%event event:nostr] + [%relays (map @ relay-stats:nostr)] + == +$ post-fact $% [%add post-wrapper] [%del post-wrapper] |
