mirror of
https://github.com/urbit/shrub.git
synced 2024-11-30 22:15:47 +03:00
chat: backend work to support ~ paths
This commit is contained in:
parent
4e2761b6a2
commit
64ff95d27c
@ -363,7 +363,8 @@
|
|||||||
:_ state
|
:_ state
|
||||||
[%pass /permissions %agent [our.bol %permission-store] %watch /updates]~
|
[%pass /permissions %agent [our.bol %permission-store] %watch /updates]~
|
||||||
::
|
::
|
||||||
?: ?=([%mailbox @ *] wir)
|
?+ wir !!
|
||||||
|
[%mailbox @ *]
|
||||||
~& mailbox-kick+wir
|
~& mailbox-kick+wir
|
||||||
?. (~(has by synced) t.wir)
|
?. (~(has by synced) t.wir)
|
||||||
:: no-op
|
:: no-op
|
||||||
@ -377,13 +378,17 @@
|
|||||||
:_ state
|
:_ state
|
||||||
[%pass chat-history %agent [ship %chat-hook] %watch chat-history]~
|
[%pass chat-history %agent [ship %chat-hook] %watch chat-history]~
|
||||||
::
|
::
|
||||||
?. ?=([%backlog @ *] wir) !!
|
[%backlog @ @ *]
|
||||||
=/ pax `path`(oust [(dec (lent t.wir)) 1] `(list @ta)`t.wir)
|
=/ pax `path`(oust [(dec (lent t.wir)) 1] `(list @ta)`t.wir)
|
||||||
?. (~(has by synced) pax) [~ state]
|
?. (~(has by synced) pax) [~ state]
|
||||||
=/ mailbox=(unit mailbox) (chat-scry pax)
|
=/ =ship
|
||||||
=. pax ?~(mailbox wir [%mailbox pax])
|
?: =('~' i.t.wir)
|
||||||
:_ state
|
(slav %p i.t.t.wir)
|
||||||
[%pass pax %agent [(slav %p i.t.wir) %chat-hook] %watch pax]~
|
(slav %p i.t.wir)
|
||||||
|
=. pax ?~((chat-scry pax) wir [%mailbox pax])
|
||||||
|
:_ state
|
||||||
|
[%pass pax %agent [ship %chat-hook] %watch pax]~
|
||||||
|
==
|
||||||
::
|
::
|
||||||
++ watch-ack
|
++ watch-ack
|
||||||
|= [wir=wire saw=(unit tang)]
|
|= [wir=wire saw=(unit tang)]
|
||||||
|
@ -232,16 +232,12 @@
|
|||||||
++ create-managed-group
|
++ create-managed-group
|
||||||
|= [=path security=rw-security ships=(set ship)]
|
|= [=path security=rw-security ships=(set ship)]
|
||||||
^- (list card)
|
^- (list card)
|
||||||
~& [path security ships]
|
?> ?=(^ path)
|
||||||
?. =(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
|
|
||||||
::
|
|
||||||
?^ (group-scry 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])]
|
~[(contact-view-poke [%create path ships])]
|
||||||
::
|
::
|
||||||
++ create-security
|
++ 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