summaryrefslogtreecommitdiff
path: root/app/sur/nostrill/comms.hoon
blob: fa60989bcc79356e6cbd76fe3a6a8be832f6f638 (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
/-  sur=nostrill, nsur=nostr, feed=trill-feed, post=trill-post
|%
+$  poke
  $%  [%req req]
      [%res res]
      [%eng engagement]
      [%dbug *]
  ==
+$  engagement
  $%  [%reply parent=@da child=post:post]
      [%del-reply parent=@da child=@da]
      [%quote src=@da =post:post]
      [%rp src=@da rt=@da]
      [%reaction post=@da reaction=@t]
  ==
+$  req
  $%  [%feed ~]
      [%thread id=@da]
  ==
+$  res
  $%  [%ok p=res-data]
      [%ng msg=@t]
  ==
+$  res-data
  $%  [%feed =fc:feed profile=(unit user-meta:nsur)]
      [%thread p=full-node:post]
  ==
:: TODO there's some overlap between what we send to the UI and we send to our followers
:: but it's not exactly the same
+$  fact
  $%  [%post post-fact]
      [%prof prof-fact]
      [%init res]
  ==
+$  post-fact
  $%  [%add p=post:post]
      [%del id=@da]
      [%changes p=post:post]
  ==
+$  prof-fact
  $%  [%prof =user-meta:nsur]
      [%keys pub=@ux]
  ==
--