diff options
Diffstat (limited to 'desk/sur/contact.hoon')
-rw-r--r-- | desk/sur/contact.hoon | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/desk/sur/contact.hoon b/desk/sur/contact.hoon new file mode 100644 index 0000000..973f954 --- /dev/null +++ b/desk/sur/contact.hoon @@ -0,0 +1,51 @@ +/+ sr=sortug +|% +++ get-contacts +|= =bowl:gall +=/ io ~(. io:sr bowl) +(scry:io %whom /1/contacts/mars whoms) +:: fuck it ++$ res +$: p=@p + contact=(unit contact) + whom=(unit whom) +== +:: %contacts ++$ foreign [for=$@(~ prof) sag=*] ++$ prof [wen=@da con=$@(~ contact)] ++$ rolodex (map ship foreign) ++$ contact +$: nickname=@t + bio=@t + status=@t + color=@ux + avatar=(unit @t) + cover=(unit @t) + groups=(set (pair ship term)) +== +:: %whom ++$ whoms (map (each @p @t) whom) ++$ whom +$: info=(map @tas info-field) + profile=(unit profile) +== ++$ access-level ?(%public %mutual) +:: ++$ profile + $: info=(map @tas [value=info-field access=access-level]) + fields=(map @tas field-def) + == ++$ field-def [name=@t type=field-type-tag] +:: ++$ field-type-tag ?(%text %date %look %tint %coll) +:: ++$ info-field + $% [%text @t] + [%date @da] + [%look @t] :: link to image + [%tint @ux] :: color (0-255) + [%coll coll] :: collection of items on Urbit (groups, apps, wikis, etc) + == +:: ++$ coll (set [=ship slug=@ta]) +-- |