mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-02 12:05:28 +03:00
implement reverse nick lookups
This commit is contained in:
parent
e226fdf0b8
commit
f1c8e0a3aa
@ -978,6 +978,15 @@
|
||||
[por ~]
|
||||
(join [[%& our.hid nom] ~ ~])
|
||||
::
|
||||
++ reverse-folks
|
||||
|= nym=span
|
||||
^- (list ship)
|
||||
%+ murn (~(tap by folks))
|
||||
|= [p=ship q=human]
|
||||
?~ hand.q ~
|
||||
?. =(u.hand.q nym) ~
|
||||
[~ u=p]
|
||||
::
|
||||
++ nick :: %nick
|
||||
|= [her=(unit ship) nym=(unit cord)]
|
||||
^+ ..sh-work
|
||||
@ -997,7 +1006,10 @@
|
||||
?~ hand.u.asc "{<u.her>}:"
|
||||
"{<u.her>}: {<u.hand.u.asc>}"
|
||||
?~ her
|
||||
(sh-note "display reverse association")
|
||||
%+ sh-fact %mor
|
||||
%+ turn (reverse-folks u.nym)
|
||||
|= p=ship
|
||||
[%txt "{<p>}: {<u.nym>}"]
|
||||
%= ..sh-work
|
||||
folks (~(put by folks) u.her [true=~ hand=nym])
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user