mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 14:42:02 +03:00
groups: cleanup rebase artifacts
This commit is contained in:
parent
2bafd3eb57
commit
9b36beeb7a
@ -27,10 +27,11 @@
|
||||
+$ state-0
|
||||
$: %0
|
||||
~
|
||||
==
|
||||
+$ poke
|
||||
$% [%chat-action chat-action]
|
||||
$% [%chat-action action:store]
|
||||
[%group-action action:group-store]
|
||||
[%chat-hook-action chat-hook-action]
|
||||
[%chat-hook-action action:hook]
|
||||
[%permission-hook-action permission-hook-action]
|
||||
[%permission-group-hook-action permission-group-hook-action]
|
||||
==
|
||||
|
@ -46,15 +46,36 @@
|
||||
++ on-load
|
||||
|= =vase
|
||||
^- (quip card _this)
|
||||
=/ old !<(state-one vase)
|
||||
`this(state old)
|
||||
:: %+ murn ~(tap by synced.old)
|
||||
:: |= [=path =ship]
|
||||
:: ^- (unit card)
|
||||
:: =/ =wire [(scot %p ship) %group path]
|
||||
:: =/ =term ?:(=(our.bowl ship) %group-store %group-hook)
|
||||
:: ?: (~(has by wex.bowl) [wire ship term]) ~
|
||||
:: `[%pass wire %agent [ship term] %watch [%group path]]
|
||||
=/ old !<(versioned-state vase)
|
||||
?- -.old
|
||||
%1 [~ this(state old)]
|
||||
%0
|
||||
:: kick all subscriptions and migrate state
|
||||
:: wait for the kick to resubscribe on
|
||||
:: correct path
|
||||
=/ kick=card
|
||||
=; kick-on=(list path)
|
||||
[%give %kick kick-on ~]
|
||||
=- ~(tap in -)
|
||||
%+ roll ~(val by sup.bowl)
|
||||
|= [[=ship pax=path] paths=(set path)]
|
||||
(~(put in paths) pax)
|
||||
:- ~[kick]
|
||||
this
|
||||
==
|
||||
::
|
||||
:: =/ watches=(list card)
|
||||
:: %+ murn ~(tap by synced.old)
|
||||
:: |= [=path =ship]
|
||||
:: ?: =(our.bowl ship)
|
||||
:: ~
|
||||
:: `
|
||||
|
||||
|
||||
:: =/ =wire [(scot %p ship) %group path]
|
||||
:: =/ =term ?:(=(our.bowl ship) %group-store %group-hook)
|
||||
:: ?: (~(has by wex.bowl) [wire ship term]) ~
|
||||
:: `[%pass wire %agent [ship term] %watch [%group path]]
|
||||
::
|
||||
++ on-poke
|
||||
|= [=mark =vase]
|
||||
@ -235,8 +256,6 @@
|
||||
--
|
||||
:: +listen-group: Start a new subscription to the proxied .group-id
|
||||
::
|
||||
:: Wire is required to prevent a race condition, see +join-group in
|
||||
:: lib/group
|
||||
++ listen-group
|
||||
|= =group-id
|
||||
^- card
|
||||
|
@ -16,7 +16,6 @@
|
||||
verb,
|
||||
grpl=group,
|
||||
group-store
|
||||
>>>>>>> bc47d0620... publish: update to new groups
|
||||
::
|
||||
~% %publish ..is ~
|
||||
|%
|
||||
@ -2229,7 +2228,7 @@
|
||||
(~(put by p.notebook-json) %subscribers (get-subscribers-json book-name))
|
||||
=. p.notebook-json
|
||||
(~(put by p.notebook-json) %writers (get-writers-json u.host book-name))
|
||||
=/ jon=json (pairs notebook+notebook-json ~)
|
||||
=/ jon=json
|
||||
(frond:enjs:format %publish-response (pairs notebook+notebook-json ~))
|
||||
(json-response:gen (json-to-octs jon))
|
||||
::
|
||||
|
@ -1,4 +1,5 @@
|
||||
/- sur=chat-view, *rw-security
|
||||
/+ group-store
|
||||
^?
|
||||
=< [sur .]
|
||||
=, sur
|
||||
@ -25,7 +26,7 @@
|
||||
[%description so]
|
||||
[%app-path pa]
|
||||
[%group-path pa]
|
||||
[%security sec]
|
||||
[%policy policy:dejs:group-store]
|
||||
[%members (as (su ;~(pfix sig fed:ag)))]
|
||||
[%allow-history bo]
|
||||
==
|
||||
@ -43,11 +44,6 @@
|
||||
++ groupify
|
||||
=- (ot [%app-path pa] [%existing -] ~)
|
||||
(mu (ot [%group-path pa] [%inclusive bo] ~))
|
||||
::
|
||||
++ sec
|
||||
=, dejs:format
|
||||
^- $-(json rw-security)
|
||||
(su (perk %channel %village %journal %mailbox ~))
|
||||
--
|
||||
--
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user