mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
changed invite peek interface to /:path/:uid
This commit is contained in:
parent
d7eb005ae8
commit
43edde1d0b
@ -350,8 +350,7 @@
|
||||
++ invite-scry
|
||||
|= uid=serial
|
||||
^- (unit invite)
|
||||
=/ pax
|
||||
(weld /=invite-store/(scot %da now.bol)/invite/(scot %uv uid) /chat/noun)
|
||||
=/ pax /=invite-store/(scot %da now.bol)/invite/chat/(scot %uv uid)/noun
|
||||
.^((unit invite) %gx pax)
|
||||
::
|
||||
++ permitted-scry
|
||||
|
@ -30,7 +30,7 @@
|
||||
?> !(team:title our.bol ship.invite.act)
|
||||
[(invite-hook-poke recipient.invite.act act)]~
|
||||
?~ (invitatory-scry path.act) ~
|
||||
?^ (invite-scry uid.act path.act) ~
|
||||
?^ (invite-scry path.act uid.act) ~
|
||||
[(invite-poke path.act act)]~
|
||||
==
|
||||
::
|
||||
@ -52,10 +52,10 @@
|
||||
.^((unit invitatory) %gx pax)
|
||||
::
|
||||
++ invite-scry
|
||||
|= [uid=serial pax=path]
|
||||
|= [pax=path uid=serial]
|
||||
^- (unit invite)
|
||||
=. pax
|
||||
;:(weld /=invite-store/(scot %da now.bol)/invite/(scot %uv uid) pax /noun)
|
||||
;:(weld /=invite-store/(scot %da now.bol)/invite pax /(scot %uv uid)/noun)
|
||||
.^((unit invite) %gx pax)
|
||||
--
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
+$ move [bone card]
|
||||
::
|
||||
+$ card
|
||||
$% [%diff diff]
|
||||
$% [%diff invite-diff]
|
||||
[%quit ~]
|
||||
==
|
||||
::
|
||||
@ -14,11 +14,6 @@
|
||||
+$ state-zero
|
||||
$: =invites
|
||||
==
|
||||
::
|
||||
+$ diff
|
||||
$% [%invite-initial invites]
|
||||
[%invite-update invite-update]
|
||||
==
|
||||
--
|
||||
::
|
||||
|_ [bol=bowl:gall state]
|
||||
@ -48,12 +43,15 @@
|
||||
++ peek-x-invite
|
||||
|= pax=path
|
||||
^- (unit (unit [%noun (unit invite)]))
|
||||
?~ pax
|
||||
:: /:path/:uid
|
||||
=/ pas (flop pax)
|
||||
?~ pas
|
||||
~
|
||||
=/ invitatory=(unit invitatory) (~(get by invites) t.pax)
|
||||
=/ uid=serial (slav %uv i.pas)
|
||||
=. pax (scag (dec (lent pax)) `(list @ta)`pax)
|
||||
=/ invitatory=(unit invitatory) (~(get by invites) pax)
|
||||
?~ invitatory
|
||||
~
|
||||
=/ uid=serial (slav %uv i.pax)
|
||||
=/ invite=(unit invite) (~(get by u.invitatory) uid)
|
||||
[~ ~ %noun invite]
|
||||
::
|
||||
|
@ -35,5 +35,10 @@
|
||||
[%invitatory =invitatory] :: receive invitatory
|
||||
[%accepted =path uid=serial =invite] :: an invite has been accepted
|
||||
==
|
||||
::
|
||||
+$ invite-diff
|
||||
$% [%invite-initial invites]
|
||||
[%invite-update invite-update]
|
||||
==
|
||||
--
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user