mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 05:22:27 +03:00
chat: backend work to support ~ paths
This commit is contained in:
parent
4e2761b6a2
commit
64ff95d27c
@ -363,7 +363,8 @@
|
||||
:_ state
|
||||
[%pass /permissions %agent [our.bol %permission-store] %watch /updates]~
|
||||
::
|
||||
?: ?=([%mailbox @ *] wir)
|
||||
?+ wir !!
|
||||
[%mailbox @ *]
|
||||
~& mailbox-kick+wir
|
||||
?. (~(has by synced) t.wir)
|
||||
:: no-op
|
||||
@ -377,13 +378,17 @@
|
||||
:_ state
|
||||
[%pass chat-history %agent [ship %chat-hook] %watch chat-history]~
|
||||
::
|
||||
?. ?=([%backlog @ *] wir) !!
|
||||
=/ pax `path`(oust [(dec (lent t.wir)) 1] `(list @ta)`t.wir)
|
||||
?. (~(has by synced) pax) [~ state]
|
||||
=/ mailbox=(unit mailbox) (chat-scry pax)
|
||||
=. pax ?~(mailbox wir [%mailbox pax])
|
||||
:_ state
|
||||
[%pass pax %agent [(slav %p i.t.wir) %chat-hook] %watch pax]~
|
||||
[%backlog @ @ *]
|
||||
=/ pax `path`(oust [(dec (lent t.wir)) 1] `(list @ta)`t.wir)
|
||||
?. (~(has by synced) pax) [~ state]
|
||||
=/ =ship
|
||||
?: =('~' i.t.wir)
|
||||
(slav %p i.t.t.wir)
|
||||
(slav %p i.t.wir)
|
||||
=. pax ?~((chat-scry pax) wir [%mailbox pax])
|
||||
:_ state
|
||||
[%pass pax %agent [ship %chat-hook] %watch pax]~
|
||||
==
|
||||
::
|
||||
++ watch-ack
|
||||
|= [wir=wire saw=(unit tang)]
|
||||
|
@ -232,16 +232,12 @@
|
||||
++ create-managed-group
|
||||
|= [=path security=rw-security ships=(set ship)]
|
||||
^- (list card)
|
||||
~& [path security ships]
|
||||
?. =(security %village)
|
||||
:: if blacklist, do nothing but create the group if it isn't there
|
||||
::
|
||||
?~((group-scry path) ~[(group-poke [%bundle path])] ~)
|
||||
:: if whitelist, check if group exists already. if yes, do nothing
|
||||
::
|
||||
?> ?=(^ path)
|
||||
?^ (group-scry path) ~
|
||||
:: if group does not exist, send contact-view %create
|
||||
:: do not create a managed group if this is a sig path or a blacklist
|
||||
::
|
||||
?: |(=(i.path '~') ?!(=(security %village)))
|
||||
~[(group-poke [%bundle path])]
|
||||
~[(contact-view-poke [%create path ships])]
|
||||
::
|
||||
++ create-security
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user