mirror of
https://github.com/ilyakooo0/urbit.git
synced 2025-01-05 13:55:54 +03:00
Can now set presence or status for specific circles, even foreign ones.
This commit is contained in:
parent
7928998e9b
commit
3e32f78ac1
@ -79,7 +79,8 @@
|
||||
{$banish p/knot q/(set ship)} ::< deny permission
|
||||
{$source p/knot q/(map partner range)} ::< add source
|
||||
:: personal metadata
|
||||
{$status p/knot q/presence} ::TODO better interface ::< set status
|
||||
{$attend p/(set circle) q/presence} ::< set our presence
|
||||
{$name p/(set circle) q/human} ::< set our name
|
||||
:: messaging ::
|
||||
{$say p/(list speech)} ::< send message
|
||||
{$eval p/cord q/twig} ::< send #-message
|
||||
@ -560,6 +561,10 @@
|
||||
==
|
||||
==
|
||||
::
|
||||
++ cirs ::< non-empty circles
|
||||
%+ cook ~(gas in *(set circle))
|
||||
(most ;~(plug com (star ace)) circ)
|
||||
::
|
||||
++ parn ::< partner
|
||||
;~ pose
|
||||
(stag %& circ)
|
||||
@ -696,7 +701,28 @@
|
||||
::
|
||||
:: personal metadata
|
||||
::
|
||||
;~((glue ace) (perk %status ~) cire (perk %gone %idle %hear %talk ~))
|
||||
;~ (glue ace)
|
||||
(perk %attend ~)
|
||||
cirs
|
||||
(perk %gone %idle %hear %talk ~)
|
||||
==
|
||||
::
|
||||
;~ plug
|
||||
(perk %name ~)
|
||||
;~(pfix ace cirs)
|
||||
;~(pfix ace ;~(pose (cook some qut) (cold ~ sig)))
|
||||
;~ pose
|
||||
;~ pfix ace
|
||||
%+ cook some
|
||||
;~ pose
|
||||
;~((glue ace) qut (cook some qut) qut)
|
||||
;~(plug qut (cold ~ ace) qut)
|
||||
==
|
||||
==
|
||||
;~(pfix ace (cold ~ sig))
|
||||
(easy ~)
|
||||
==
|
||||
==
|
||||
::
|
||||
:: displaying info
|
||||
::
|
||||
@ -839,7 +865,8 @@
|
||||
$banish (banish +.job)
|
||||
$source (source +.job)
|
||||
:: personal metadata
|
||||
$status (status +.job)
|
||||
$attend (attend +.job)
|
||||
$name (name +.job)
|
||||
:: messaging
|
||||
$say (say +.job)
|
||||
$eval (eval +.job)
|
||||
@ -1024,12 +1051,19 @@
|
||||
::> ||
|
||||
::+|
|
||||
::
|
||||
++ status ::< set status
|
||||
::>
|
||||
++ attend ::< set our presence
|
||||
::> sets our presence to {pec} in circles {cis}.
|
||||
::
|
||||
|= {nom/knot pec/presence}
|
||||
|= {cis/(set circle) pec/presence}
|
||||
^+ ..sh-work
|
||||
(sh-act %status [nom ~ ~] [pec [~ ~]])
|
||||
(sh-act %notify cis pec)
|
||||
::
|
||||
++ name ::< set our name
|
||||
::> sets our name to {man} in circles {cis}.
|
||||
::
|
||||
|= {cis/(set circle) man/human}
|
||||
^+ ..sh-work
|
||||
(sh-act %naming cis man)
|
||||
::
|
||||
::> ||
|
||||
::> || %messaging
|
||||
@ -1077,7 +1111,7 @@
|
||||
|= {a/ship b/presence c/human} ^- (unit tank)
|
||||
=. c
|
||||
?. =(han.c `(scot %p a)) c
|
||||
[tru.c ~]
|
||||
[~ tru.c]
|
||||
?- b
|
||||
$gone ~
|
||||
$idle `leaf+:(weld "idle " (scow %p a) " " (trip (fall han.c '')))
|
||||
|
@ -230,12 +230,26 @@
|
||||
::> %publish commands prompt us (as a circle host)
|
||||
::> to verify and distribute messages.
|
||||
$publish (ta-think | src +.cod)
|
||||
::> %present commands are used to ask us to set
|
||||
::> someone's status in the indicated stories.
|
||||
$present (ta-present src +.cod)
|
||||
::> %bearing commands are used by our children to
|
||||
::> let us know they're bearing our /burden. we
|
||||
::> need to watch them to allow changes to go up.
|
||||
$bearing (ta-observe src)
|
||||
==
|
||||
::
|
||||
++ ta-present ::< update a status
|
||||
::>
|
||||
::
|
||||
|= {who/ship nos/(set knot) dif/diff-status}
|
||||
^+ +>
|
||||
%- ta-deltas
|
||||
%- ~(rep in nos)
|
||||
|= {n/knot l/(list delta)}
|
||||
:_ l
|
||||
[%story n %status [%& our.bol n] who dif]
|
||||
::
|
||||
++ ta-action ::< apply reader action
|
||||
::> performs action sent by a reader.
|
||||
::
|
||||
@ -268,7 +282,8 @@
|
||||
$convey (action-convey +.act)
|
||||
$phrase (action-phrase +.act)
|
||||
:: personal metadata
|
||||
$status (action-status +.act)
|
||||
$notify (action-notify +.act)
|
||||
$naming (action-naming +.act)
|
||||
:: changing shared ui
|
||||
$glyph (action-glyph +.act)
|
||||
$nick (action-nick +.act)
|
||||
@ -295,6 +310,28 @@
|
||||
|= {nom/knot dif/diff-story}
|
||||
(ta-delta %story nom dif)
|
||||
::
|
||||
++ present ::< send status update
|
||||
::>
|
||||
::
|
||||
|= {cis/(set circle) dif/diff-status}
|
||||
^+ ..ta-action
|
||||
=/ cic
|
||||
^- (jug ship knot)
|
||||
%- ~(rep in cis)
|
||||
|= {c/circle m/(jug ship knot)}
|
||||
(~(put ju m) hos.c nom.c)
|
||||
=. ..ta-action ::TODO =?
|
||||
?. (~(has by cic) our.bol) ..ta-action
|
||||
%- ~(rep in (~(get ju cic) our.bol))
|
||||
|= {n/knot _ta}
|
||||
(affect n %status [%& our.bol n] our.bol dif)
|
||||
=. cic (~(del by cic) our.bol)
|
||||
%- ta-deltas
|
||||
%- ~(rep by cic)
|
||||
|= {{h/ship s/(set knot)} l/(list delta)}
|
||||
:_ l
|
||||
[%present h s dif]
|
||||
::
|
||||
::> || %circle-configuration
|
||||
::+|
|
||||
++ action-create ::< create story
|
||||
@ -385,20 +422,20 @@
|
||||
::
|
||||
::> || %personal-metadata
|
||||
::+|
|
||||
++ action-status ::< our status update
|
||||
::> for every story in the set, update our status.
|
||||
::TODO accept (set circle). for locals, do directly.
|
||||
:: for remotes, send command.
|
||||
:: on getting such a command, first check if
|
||||
:: the sender actually is in our presende map.
|
||||
::TODO split interface into action-presence and
|
||||
:: action-human.
|
||||
::
|
||||
++ action-notify ::< our presence update
|
||||
::>
|
||||
::
|
||||
|= {nos/(set knot) sat/status}
|
||||
|= {cis/(set circle) pes/presence}
|
||||
^+ ..ta-action
|
||||
%- ~(rep in nos)
|
||||
|= {k/knot _ta}
|
||||
(affect k %status [%& our.bol k] our.bol %full sat)
|
||||
(present cis %presence pes)
|
||||
::
|
||||
++ action-naming ::< our name update
|
||||
::>
|
||||
::
|
||||
|= {cis/(set circle) man/human}
|
||||
^+ ..ta-action
|
||||
(present cis %human %full man)
|
||||
::
|
||||
::> || %changing-shared-ui
|
||||
::+|
|
||||
@ -1100,6 +1137,19 @@
|
||||
%- da-emit
|
||||
[ost.bol %diff %talk-reaction rac]
|
||||
::
|
||||
++ da-present ::< send %present cmd
|
||||
::>
|
||||
::
|
||||
|= {hos/ship nos/(set knot) dif/diff-status}
|
||||
^+ +>
|
||||
%- da-emit
|
||||
:* ost.bol
|
||||
%poke
|
||||
/present
|
||||
[hos %talk-guardian]
|
||||
[%talk-command %present nos dif]
|
||||
==
|
||||
::
|
||||
::> ||
|
||||
::> || %change-application
|
||||
::> ||
|
||||
@ -1113,15 +1163,16 @@
|
||||
|= dif/delta
|
||||
^+ +>
|
||||
?- -.dif
|
||||
$out (da-change-out +.dif)
|
||||
$done (da-change-done +.dif)
|
||||
$glyph (da-change-glyph +.dif)
|
||||
$nick (da-change-nick +.dif)
|
||||
$story (da-change-story +.dif)
|
||||
$init da-init
|
||||
$out (da-change-out +.dif)
|
||||
$done (da-change-done +.dif)
|
||||
$glyph (da-change-glyph +.dif)
|
||||
$nick (da-change-nick +.dif)
|
||||
$story (da-change-story +.dif)
|
||||
$init da-init
|
||||
$observe (da-observe +.dif)
|
||||
$react (da-react +.dif)
|
||||
$quit (da-emit [ost.dif %quit ~])
|
||||
$react (da-react +.dif)
|
||||
$present (da-present +.dif)
|
||||
$quit (da-emit [ost.dif %quit ~])
|
||||
==
|
||||
::
|
||||
++ da-init ::< startup side-effects
|
||||
|
@ -144,8 +144,8 @@
|
||||
man
|
||||
?- -.dif.dif
|
||||
$full man.dif.dif
|
||||
$true [tru.dif.dif han.man.sat]
|
||||
$handle [tru.man.sat han.dif.dif]
|
||||
$true [han.man.sat tru.dif.dif]
|
||||
$handle [han.dif.dif tru.man.sat]
|
||||
==
|
||||
==
|
||||
==
|
||||
|
@ -57,6 +57,7 @@
|
||||
{$init $~} ::< initialize
|
||||
{$observe who/ship} ::< watch burden bearer
|
||||
{$react rac/reaction} ::< reaction to action
|
||||
{$present hos/ship nos/(set knot) dif/diff-status}::< send %present cmd
|
||||
{$quit ost/bone} ::< force unsubscribe
|
||||
== ::
|
||||
++ diff-glyph {bin/? gyf/char pas/(set partner)} ::< un/bound glyph
|
||||
@ -111,8 +112,8 @@
|
||||
{$convey tos/(list thought)} ::< post exact
|
||||
{$phrase aud/(set partner) ses/(list speech)} ::< post easy
|
||||
:: personal metadata ::
|
||||
::TODO change to target partners, not only our circles.
|
||||
{$status nos/(set knot) sat/status} ::< our status update
|
||||
{$notify cis/(set circle) pes/presence} ::< our presence update
|
||||
{$naming cis/(set circle) man/human} ::< our name update
|
||||
:: changing shared ui ::
|
||||
{$glyph gyf/char pas/(set partner) bin/?} ::< un/bind a glyph
|
||||
{$nick who/ship nic/knot} ::< new identity
|
||||
@ -131,6 +132,7 @@
|
||||
::
|
||||
++ command ::> effect on story
|
||||
$% {$publish tos/(list thought)} ::< deliver
|
||||
{$present nos/(set knot) dif/diff-status} ::< status update
|
||||
{$bearing $~} ::< prompt to listen
|
||||
== ::
|
||||
::
|
||||
@ -176,8 +178,8 @@
|
||||
$talk ::< typing
|
||||
== ::
|
||||
++ human ::> human identifier
|
||||
$: tru/(unit (trel cord (unit cord) cord)) ::< true name
|
||||
han/(unit cord) ::< handle
|
||||
$: han/(unit cord) ::< handle
|
||||
tru/(unit (trel cord (unit cord) cord)) ::< true name
|
||||
== ::
|
||||
::
|
||||
::> ||
|
||||
|
Loading…
Reference in New Issue
Block a user