blob: 136547b6220e3356107283cc978f0d99bca600db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
/- nostr, trill=trill-feed, tp=trill-post, gate=trill-gate
|%
+$ state state-0
+$ state-0
$: %0
:: nostr config
relays=(map @ud relay-stats:nostr) :: key is the websocket id
keys=(lest keys:nostr) :: cycled, i.keys is current one
:: own feed
feed=feed:trill
feed-perms=gate:gate
:: nostr feed from relays
:: TODO deprecate and parse properly into a feed:trill
=nostr-feed
:: profiles
profiles=(map user user-meta:nostr)
following=(map user =feed:trill)
following2=feed:trill
follow-graph=(map user (set user))
:: TODO global feed somehow?
:: TODO use %hark agent instead?
:: notifications=((mop @da notif) gth)
==
+$ nostr-feed ((mop @ud event:nostr) gth)
++ norm ((on @ud event:nostr) gth)
+$ nfc [feed=nostr-feed start=cursor:trill end=cursor:trill]
+$ post-wrapper [=post:tp nostr-meta=nostr-meta]
+$ nostr-meta
$: pub=(unit @ux)
ev-id=(unit @ux)
relay=(unit @t)
pr=(unit user-meta:nostr)
==
+$ user $%([%urbit p=@p] [%nostr p=@ux])
+$ follow [pubkey=@ux name=@t relay=(unit @t)]
+$ notif
$% [%prof =user prof=user-meta:nostr] :: profile change
[%fols =user accepted=? msg=@t] :: follow response
[%beg beg=begs-poke:ui accepted=? msg=@t] :: feed/post data request response
[%fans p=user] :: someone folowed me
[%post =pid:tp =user action=post-notif] :: someone replied, reacted etc.
==
+$ post-notif
$% [%reply p=post:tp]
[%quote p=post:tp]
[%reaction reaction=@t]
:: [%rt id=@ux pubkey=@ux relay=@t] :: NIP-18
[%rp ~] :: NIP-18
[%del ~]
==
++ ui
|%
+$ poke
$% [%fols fols-poke]
[%begs begs-poke]
[%post post-poke]
[%prof prof-poke]
[%keys ~] :: cycle-keys
[%rela relay-poke]
:: [%notif @da] :: dismiss notification
==
+$ begs-poke
$% [%feed p=@p]
[%thread p=@p id=@da]
==
+$ post-poke
$% [%add content=@t]
[%reply content=@t host=@p id=@da thread=@da]
[%quote content=@t host=@p id=@da]
[%rp host=@p id=@da] :: NIP-18
[%reaction host=@p id=@da reaction=@t]
:: [%rt id=@ux pubkey=@ux relay=@t] :: NIP-18
[%del host=@p id=@da]
==
+$ fols-poke
$% [%add =user]
[%del =user]
==
+$ prof-poke
$% [%add meta=user-meta:nostr]
[%del ~]
==
+$ relay-poke
$% [%add p=@t]
[%del p=@ud]
::
[%sync ~]
:: send event for... relaying
[%send host=@p id=@ relays=(list @t)]
==
:: facts
+$ fact
$% [%nostr feed=nostr-feed]
[%post post-fact]
[%enga p=post-wrapper reaction=*]
[%fols fols-fact]
[%hark =notif]
==
+$ post-fact
$% [%add post-wrapper]
[%del post-wrapper]
==
+$ fols-fact
$% [%new =user =fc:trill meta=(unit user-meta:nostr)]
[%quit =user]
==
--
--
|