urbit/pkg/arvo/sur/invite-store.hoon

45 lines
1.4 KiB
Plaintext
Raw Normal View History

|%
++ serial @uvH
::
+$ invite
2019-11-01 01:13:23 +03:00
$: =ship :: ship to subscribe to upon accepting invite
app=@tas :: app to subscribe to upon accepting invite
=path :: path to subscribe to upon accepting invite
recipient=ship :: recipient to receive invite
text=cord :: text to describe the invite
==
::
2019-11-01 01:13:23 +03:00
:: +invites: each application using invites creates its own path that
:: contains a map of serial to invite. this allows it to only receive
:: invites that it is concerned with
::
+$ invites (map path invitatory) :: main data structure
::
+$ invitatory (map serial invite) :: containing or conveying an invitation
::
::
+$ invite-base
2019-11-01 01:13:23 +03:00
$% [%create =path] :: create a path
[%delete =path] :: delete a path
[%invite =path uid=serial =invite] :: receive an invite at path/uid
[%decline =path uid=serial] :: decline an invite at path/uid
==
::
+$ invite-action
$% invite-base
2019-11-01 01:13:23 +03:00
[%accept =path uid=serial] :: accept an invite at path/uid
==
::
+$ invite-update
$% invite-base
2019-11-01 01:13:23 +03:00
[%invitatory =invitatory] :: receive invitatory
[%accepted =path uid=serial =invite] :: an invite has been accepted
==
::
+$ invite-diff
$% [%invite-initial invites]
[%invite-update invite-update]
==
--